Share via


IRelationalCommand.CreateDbCommand Method

Definition

Called by the execute methods to create a DbCommand for the given DbConnection and configure timeouts and transactions.

This method is typically used by database providers (and other extensions). It is generally not used in application code.

public virtual System.Data.Common.DbCommand CreateDbCommand (Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject parameterObject, Guid commandId, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod commandMethod);
abstract member CreateDbCommand : Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject * Guid * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod -> System.Data.Common.DbCommand
override this.CreateDbCommand : Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject * Guid * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod -> System.Data.Common.DbCommand
Public Overridable Function CreateDbCommand (parameterObject As RelationalCommandParameterObject, commandId As Guid, commandMethod As DbCommandMethod) As DbCommand

Parameters

parameterObject
RelationalCommandParameterObject

Parameters for this method.

commandId
Guid

The command correlation ID.

commandMethod
DbCommandMethod

The method that will be called on the created command.

Returns

The created command.

Applies to