RelationalDbContextOptionsBuilder<TBuilder,TExtension>.CommandTimeout Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configures the wait time (in seconds) before terminating the attempt to execute a command and generating an error.
public virtual TBuilder CommandTimeout (int? commandTimeout);
abstract member CommandTimeout : Nullable<int> -> 'Builder
override this.CommandTimeout : Nullable<int> -> 'Builder
Public Overridable Function CommandTimeout (commandTimeout As Nullable(Of Integer)) As TBuilder
Parameters
Returns
The same builder instance so that multiple calls can be chained.
Remarks
This sets the CommandTimeout property on the ADO.NET provider being used.
An ArgumentException is generated if commandTimeout
value is less than 0.
Zero (0) typically means no timeout will be applied, consult your ADO.NET provider documentation.
See Connections and connection strings for more information and examples.
Applies to
Entity Framework