Sprache

IRelationalCommandDiagnosticsLogger.CommandErrorAsync Methode

Definition

Überlädt

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

Quelle:
IRelationalCommandDiagnosticsLogger.cs
Quelle:
IRelationalCommandDiagnosticsLogger.cs

Protokolliert das CommandError Ereignis.

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

Parameter

connection
IRelationalConnection

Die Verbindung.

command
DbCommand

Das Datenbankbefehlsobjekt.

logCommandText
String

Der Befehlstext, der protokolliert werden kann.

context
DbContext

Der DbContext aktuell verwendete Wert ist null, wenn er nicht bekannt ist.

executeMethod
DbCommandMethod

Stellt die Methode dar, die aufgerufen wird, um den Befehl auszuführen.

commandId
Guid

Die Korrelations-ID, die dem angegebenen DbCommandZugeordnet ist.

connectionId
Guid

Die Korrelations-ID, die dem DbConnection verwendeten Element zugeordnet ist.

exception
Exception

Die Ausnahme, die diesen Fehler verursacht hat.

startTime
DateTimeOffset

Die Zeit, zu der die Ausführung begann.

duration
TimeSpan

Die Zeitspanne, die bis zum Auslösen der Ausnahme überschritten wurde.

commandSource
CommandSource

Quelle des Befehls.

cancellationToken
CancellationToken

A CancellationToken , um zu beobachten, während sie auf den Abschluss der Aufgabe warten.

Gibt zurück

A Task representing the async operation.

Ausnahmen

Wenn der CancellationToken Vorgang abgebrochen wird.

Gilt für:

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

Quelle:
IRelationalCommandDiagnosticsLogger.cs
Quelle:
IRelationalCommandDiagnosticsLogger.cs
Quelle:
IRelationalCommandDiagnosticsLogger.cs
Quelle:
IRelationalCommandDiagnosticsLogger.cs

Protokolliert das CommandError Ereignis.

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

Parameter

connection
IRelationalConnection

Die Verbindung.

command
DbCommand

Das Datenbankbefehlsobjekt.

context
DbContext

Der DbContext aktuell verwendete Wert ist null, wenn er nicht bekannt ist.

executeMethod
DbCommandMethod

Stellt die Methode dar, die aufgerufen wird, um den Befehl auszuführen.

commandId
Guid

Die Korrelations-ID, die dem angegebenen DbCommandZugeordnet ist.

connectionId
Guid

Die Korrelations-ID, die dem DbConnection verwendeten Element zugeordnet ist.

exception
Exception

Die Ausnahme, die diesen Fehler verursacht hat.

startTime
DateTimeOffset

Die Zeit, zu der die Ausführung begann.

duration
TimeSpan

Die Zeitspanne, die bis zum Auslösen der Ausnahme überschritten wurde.

commandSource
CommandSource

Quelle des Befehls.

cancellationToken
CancellationToken

A CancellationToken , um zu beobachten, während sie auf den Abschluss der Aufgabe warten.

Gibt zurück

A Task representing the async operation.

Ausnahmen

Wenn der CancellationToken Vorgang abgebrochen wird.

Gilt für: