RelationalCommand.CreateCommand Method

Definition

Template method 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.

protected virtual System.Data.Common.DbCommand CreateCommand (Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject parameterObject, Guid commandId, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod commandMethod);
abstract member CreateCommand : Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject * Guid * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod -> System.Data.Common.DbCommand
override this.CreateCommand : Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject * Guid * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod -> System.Data.Common.DbCommand
Protected Overridable Function CreateCommand (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