Lingua

IRelationalCommandDiagnosticsLogger.CommandErrorAsync Metodo

Definizione

Overload

CommandErrorAsync(IRelationalConnection, DbCommand, String, DbContext, DbCommandMethod, Guid, Guid, Exception, DateTimeOffset, TimeSpan, CommandSource, CancellationToken)

Origine:
IRelationalCommandDiagnosticsLogger.cs
Origine:
IRelationalCommandDiagnosticsLogger.cs

Registra l'evento CommandError .

public System.Threading.Tasks.Task CommandErrorAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, string logCommandText, Microsoft.EntityFrameworkCore.DbContext? context, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod executeMethod, Guid commandId, Guid connectionId, Exception exception, DateTimeOffset startTime, TimeSpan duration, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource, System.Threading.CancellationToken cancellationToken = default);
abstract member CommandErrorAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * string * Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Guid * Guid * Exception * DateTimeOffset * TimeSpan * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function CommandErrorAsync (connection As IRelationalConnection, command As DbCommand, logCommandText As String, context As DbContext, executeMethod As DbCommandMethod, commandId As Guid, connectionId As Guid, exception As Exception, startTime As DateTimeOffset, duration As TimeSpan, commandSource As CommandSource, Optional cancellationToken As CancellationToken = Nothing) As Task

Parametri

connection
IRelationalConnection

Connessione.

command
DbCommand

Oggetto comando di database.

logCommandText
String

Testo del comando che può essere registrato.

context
DbContext

Oggetto DbContext attualmente in uso, 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 utilizzato.

exception
Exception

Eccezione che ha causato questo errore.

startTime
DateTimeOffset

Ora di inizio dell'esecuzione.

duration
TimeSpan

Quantità di tempo trascorsa fino a quando non viene generata l'eccezione.

commandSource
CommandSource

Origine del comando.

cancellationToken
CancellationToken

Oggetto CancellationToken da osservare durante l'attesa del completamento dell'attività.

Valori restituiti

Oggetto Task che rappresenta l'operazione asincrona.

Eccezioni

Se l'oggetto CancellationToken viene annullato.

Si applica a

CommandErrorAsync(IRelationalConnection, DbCommand, DbContext, DbCommandMethod, Guid, Guid, Exception, DateTimeOffset, TimeSpan, CommandSource, CancellationToken)

Origine:
IRelationalCommandDiagnosticsLogger.cs
Origine:
IRelationalCommandDiagnosticsLogger.cs
Origine:
IRelationalCommandDiagnosticsLogger.cs
Origine:
IRelationalCommandDiagnosticsLogger.cs

Registra l'evento CommandError .

public System.Threading.Tasks.Task CommandErrorAsync(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, System.Threading.CancellationToken cancellationToken = default);
abstract member CommandErrorAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Guid * Guid * Exception * DateTimeOffset * TimeSpan * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function CommandErrorAsync (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, Optional cancellationToken As CancellationToken = Nothing) As Task

Parametri

connection
IRelationalConnection

Connessione.

command
DbCommand

Oggetto comando di database.

context
DbContext

Oggetto DbContext attualmente in uso, 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 utilizzato.

exception
Exception

Eccezione che ha causato questo errore.

startTime
DateTimeOffset

Ora di inizio dell'esecuzione.

duration
TimeSpan

Quantità di tempo trascorsa fino a quando non viene generata l'eccezione.

commandSource
CommandSource

Origine del comando.

cancellationToken
CancellationToken

Oggetto CancellationToken da osservare durante l'attesa del completamento dell'attività.

Valori restituiti

Oggetto Task che rappresenta l'operazione asincrona.

Eccezioni

Se l'oggetto CancellationToken viene annullato.

Si applica a