Condividi tramite


IRelationalCommandDiagnosticsLogger.CommandError Metodo

Definizione

Registra l'evento CommandError .

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)

Parametri

connection
IRelationalConnection

Connessione.

command
DbCommand

Oggetto comando del database.

context
DbContext

Oggetto DbContext attualmente usato, per null se non noto.

executeMethod
DbCommandMethod

Rappresenta il metodo che verrà chiamato per eseguire il comando.

commandId
Guid

ID di correlazione associato all'oggetto specificato DbCommand.

connectionId
Guid

ID di correlazione associato all'oggetto DbConnection usato.

exception
Exception

Eccezione che ha causato questo errore.

startTime
DateTimeOffset

Ora in cui è iniziata l'esecuzione.

duration
TimeSpan

Tempo trascorso fino alla generazione dell'eccezione.

commandSource
CommandSource

Origine del comando.

Si applica a