DataContext.CommandTimeout Property

Definition

Gets or sets a value that increases the time-out period (in seconds) for queries that would otherwise time out during the default time-out period.

public int CommandTimeout { get; set; }

Property Value

An integer value that increases the time-out period (in seconds) for queries that would otherwise time out during the default time-out period.

Remarks

This property gets or sets the command time-out (in seconds) used to execute generated commands (IDbCommands). For more information, see CommandTimeout.

When this property is not set, the default value of CommandTimeout is used for query command execution. This default value is set by the storage provider. Note that some providers may throw exceptions if this value is set to a non-zero value.

Applies to

Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1