Class Configuration
Contains global linq2db settings.
public static class Configuration
- Inheritance
-
objectConfiguration
Properties
MaxArrayParameterLengthLogging
Determines number of items after which logging of collection data in SQL will be truncated. This is to avoid Out-Of-Memory exceptions when getting SqlText from TraceInfo.
public static int MaxArrayParameterLengthLogging { get; set; }
Property Value
Remarks
This value defaults to 8 elements. Use a value of -1 to disable and always log full collection. Set to 0 to truncate all data.
MaxBinaryParameterLengthLogging
Determines the length after which logging of binary data in SQL will be truncated. This is to avoid Out-Of-Memory exceptions when getting SqlText from TraceInfo.
public static int MaxBinaryParameterLengthLogging { get; set; }
Property Value
Remarks
This value defaults to 100. Use a value of -1 to disable and always log full binary. Set to 0 to truncate all binary data.
MaxStringParameterLengthLogging
Determines the length after which logging of string data in SQL will be truncated. This is to avoid Out-Of-Memory exceptions when getting SqlText from TraceInfo.
public static int MaxStringParameterLengthLogging { get; set; }
Property Value
Remarks
This value defaults to 200. Use a value of -1 to disable and always log full string. Set to 0 to truncate all string data.
OptimizeForSequentialAccess
Enables mapping expression to be compatible with SequentialAccess behavior. Note that it doesn't switch linq2db to use SequentialAccess behavior for queries, so this optimization could be used for Default too. Default value: false.
public static bool OptimizeForSequentialAccess { get; set; }
Property Value
Remarks
This is a process-global default for the OptimizeForSequentialAccess context option; prefer setting it per-context via UseOptimizeForSequentialAccess(DataOptions, bool) when different contexts (e.g. parallel test lanes) need different values.
TraceMaterializationActivity
Enables tracing of object materialization activity. It can significantly break performance if tracing consumer performs slow, so it is disabled by default.
public static bool TraceMaterializationActivity { get; set; }
Property Value
TranslationThreadMaxHopCount
Maximum number of hops to other threads during translation. When all threads used up, application will throw InsufficientExecutionStackException. To disable this feature and produce StackOverflowException when stack is used up, set -1 as value. Default value: 5.
public static int TranslationThreadMaxHopCount { get; set; }
Property Value
UseNullableTypesMetadata
Whether or not Nullable Reference Types annotations from C# are read and taken into consideration to determine if a column or association can be null. Nullable Types can be overriden with explicit CanBeNull annotations in [Column], [Association], or [Nullable].
public static bool UseNullableTypesMetadata { get; set; }
Property Value
Remarks
Defaults to false.