Partilhar via


IRelationalCommandDiagnosticsLogger.CommandError Método

Definição

Logs do CommandError evento.

public void CommandError (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext? context, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod executeMethod, Guid commandId, Guid connectionId, Exception exception, DateTimeOffset startTime, TimeSpan duration, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource);
abstract member CommandError : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Guid * Guid * Exception * DateTimeOffset * TimeSpan * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource -> unit
Public Sub CommandError (connection As IRelationalConnection, command As DbCommand, context As DbContext, executeMethod As DbCommandMethod, commandId As Guid, connectionId As Guid, exception As Exception, startTime As DateTimeOffset, duration As TimeSpan, commandSource As CommandSource)

Parâmetros

connection
IRelationalConnection

A conexão.

command
DbCommand

O objeto de comando do banco de dados.

context
DbContext

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

executeMethod
DbCommandMethod

Representa o método que será chamado para executar o comando.

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.

exception
Exception

A exceção que causou essa falha.

startTime
DateTimeOffset

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

duration
TimeSpan

A quantidade de tempo que passou até que a exceção fosse gerada.

commandSource
CommandSource

Origem do comando.

Aplica-se a