Compartilhar via


IRelationalCommandDiagnosticsLogger.CommandCreating Método

Definição

Logs do CommandCreating evento.

public Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand> CommandCreating (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod commandMethod, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, DateTimeOffset startTime, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource);
abstract member CommandCreating : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * DateTimeOffset * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand>
Public Function CommandCreating (connection As IRelationalConnection, commandMethod As DbCommandMethod, context As DbContext, commandId As Guid, connectionId As Guid, startTime As DateTimeOffset, commandSource As CommandSource) As InterceptionResult(Of DbCommand)

Parâmetros

connection
IRelationalConnection

A conexão.

commandMethod
DbCommandMethod

O tipo de método que será chamado neste comando.

context
DbContext

O DbContext que está sendo usado no momento, para nulo, se não for conhecido.

commandId
Guid

A ID de correlação associada ao determinado DbCommand.

connectionId
Guid

A ID de correlação associada ao DbConnection que está sendo usado.

startTime
DateTimeOffset

A hora em que a execução começou.

commandSource
CommandSource

Origem do comando.

Retornos

Um resultado interceptado.

Aplica-se a