RelationalLoggerExtensions.CommandNonQueryExecutedAsync Methode

Definition

Protokolle für das CommandExecuted Ereignis.

public static System.Threading.Tasks.Task<int> CommandNonQueryExecutedAsync (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> diagnostics, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext context, Guid commandId, Guid connectionId, int methodResult, DateTimeOffset startTime, TimeSpan duration, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.ValueTask<int> CommandNonQueryExecutedAsync (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> diagnostics, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext context, Guid commandId, Guid connectionId, int methodResult, DateTimeOffset startTime, TimeSpan duration, System.Threading.CancellationToken cancellationToken = default);
static member CommandNonQueryExecutedAsync : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * int * DateTimeOffset * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
static member CommandNonQueryExecutedAsync : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * int * DateTimeOffset * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<int>
<Extension()>
Public Function CommandNonQueryExecutedAsync (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Database.Command), connection As IRelationalConnection, command As DbCommand, context As DbContext, commandId As Guid, connectionId As Guid, methodResult As Integer, startTime As DateTimeOffset, duration As TimeSpan, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Integer)
<Extension()>
Public Function CommandNonQueryExecutedAsync (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Database.Command), connection As IRelationalConnection, command As DbCommand, context As DbContext, commandId As Guid, connectionId As Guid, methodResult As Integer, startTime As DateTimeOffset, duration As TimeSpan, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Integer)

Parameter

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Database.Command>

Die zu verwendende Diagnose-Protokollierung.

connection
IRelationalConnection

Die Verbindung.

command
DbCommand

Das Datenbankbefehlsobjekt.

context
DbContext

Die DbContext derzeit verwendet wird, auf NULL, wenn nicht bekannt.

commandId
Guid

Die Korrelations-ID, die dem angegebenen DbCommandzugeordnet ist.

connectionId
Guid

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

methodResult
Int32

Der Rückgabewert aus der zugrunde liegenden Methodenausführung.

startTime
DateTimeOffset

Der Zeitpunkt, zu dem die Ausführung begonnen hat.

duration
TimeSpan

Die Dauer der Befehlsausführung, einschließlich der Nutzung von Ergebnissen.

cancellationToken
CancellationToken

Das Abbruchtoken.

Gibt zurück

Das Ergebnis der Ausführung, die möglicherweise von einem Interceptor geändert wurde.

Gilt für: