Compartilhar via


IRelationalCommandDiagnosticsLogger.CommandInitialized Método

Definição

Logs do CommandInitialized evento.

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

Parâmetros

connection
IRelationalConnection

A conexão.

command
DbCommand

O objeto de comando do banco de dados.

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.

duration
TimeSpan

A duração da criação do comando.

commandSource
CommandSource

Origem do comando.

Retornos

Um resultado interceptado.

Aplica-se a