Table of Contents

Class DataContextOptions

Namespace
LinqToDB
Assembly
linq2db.dll
public sealed record DataContextOptions : IOptionSet, IConfigurationID, IEquatable<DataContextOptions>
Inheritance
object
DataContextOptions
Implements
Extension Methods

Constructors

DataContextOptions()

public DataContextOptions()

DataContextOptions(int?, IReadOnlyList<IInterceptor>?, IReadOnlyList<IMemberTranslator>?)

public DataContextOptions(int? CommandTimeout = null, IReadOnlyList<IInterceptor>? Interceptors = null, IReadOnlyList<IMemberTranslator>? MemberTranslators = null)

Parameters

CommandTimeout int?

The command timeout in seconds, or null if none has been set. Negative timeout value means that default timeout will be used. 0 timeout value corresponds to infinite timeout. By default, timeout is not set and default value for current provider used.

Interceptors IReadOnlyList<IInterceptor>

Gets Interceptors to use with DataConnection instance.

MemberTranslators IReadOnlyList<IMemberTranslator>

Properties

CommandTimeout

The command timeout in seconds, or null if none has been set. Negative timeout value means that default timeout will be used. 0 timeout value corresponds to infinite timeout. By default, timeout is not set and default value for current provider used.

public int? CommandTimeout { get; init; }

Property Value

int?

Default

Gets default DataContextOptions instance.

public static DataContextOptions Default { get; set; }

Property Value

DataContextOptions

Interceptors

Gets Interceptors to use with DataConnection instance.

public IReadOnlyList<IInterceptor>? Interceptors { get; init; }

Property Value

IReadOnlyList<IInterceptor>

MemberTranslators

public IReadOnlyList<IMemberTranslator>? MemberTranslators { get; init; }

Property Value

IReadOnlyList<IMemberTranslator>

Methods

Equals(DataContextOptions?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(DataContextOptions? other)

Parameters

other DataContextOptions

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.