Table of Contents

Class Configuration

Namespace
LinqToDB.Common
Assembly
linq2db.dll

Contains global linq2db settings.

public static class Configuration
Inheritance
object
Configuration

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

int

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

int

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

int

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

bool

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

bool

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

int

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

bool

Remarks

Defaults to false.