Class DataContextOptions
- Namespace
- LinqToDB
- Assembly
- linq2db.dll
public sealed record DataContextOptions : IOptionSet, IConfigurationID, IEquatable<DataContextOptions>
- Inheritance
-
objectDataContextOptions
- 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
CommandTimeoutint?The command timeout in seconds, or
nullif 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.InterceptorsIReadOnlyList<IInterceptor>Gets Interceptors to use with DataConnection instance.
MemberTranslatorsIReadOnlyList<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
Interceptors
Gets Interceptors to use with DataConnection instance.
public IReadOnlyList<IInterceptor>? Interceptors { get; init; }
Property Value
MemberTranslators
public IReadOnlyList<IMemberTranslator>? MemberTranslators { get; init; }
Property Value
Methods
Equals(DataContextOptions?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(DataContextOptions? other)
Parameters
otherDataContextOptionsAn object to compare with this object.
Returns
- bool
true if the current object is equal to the
otherparameter; otherwise, false.
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.