Share via


RelationalDatabaseFacadeExtensions.GetCommandTimeout(DatabaseFacade) Method

Definition

Returns the timeout (in seconds) set for commands executed with this DbContext.

public static int? GetCommandTimeout (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade);
static member GetCommandTimeout : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade -> Nullable<int>
<Extension()>
Public Function GetCommandTimeout (databaseFacade As DatabaseFacade) As Nullable(Of Integer)

Parameters

databaseFacade
DatabaseFacade

The DatabaseFacade for the context.

Returns

The timeout, in seconds, or null if no timeout has been set.

Remarks

Note that the command timeout is distinct from the connection timeout, which is commonly set on the database connection string.

See Connections and connection strings for more information and examples.

Applies to