Język

IRelationalCommandDiagnosticsLogger.CommandScalarExecutedAsync Metoda

Definicja

Przeciążenia

CommandScalarExecutedAsync(IRelationalConnection, DbCommand, String, DbContext, Guid, Guid, Object, DateTimeOffset, TimeSpan, CommandSource, CancellationToken)

Źródło:
IRelationalCommandDiagnosticsLogger.cs
Źródło:
IRelationalCommandDiagnosticsLogger.cs

Rejestruje zdarzenie CommandExecuted .

public System.Threading.Tasks.ValueTask<object?> CommandScalarExecutedAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, string logCommandText, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, object? methodResult, DateTimeOffset startTime, TimeSpan duration, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource, System.Threading.CancellationToken cancellationToken = default);
abstract member CommandScalarExecutedAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * string * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * obj * DateTimeOffset * TimeSpan * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<obj>
Public Function CommandScalarExecutedAsync (connection As IRelationalConnection, command As DbCommand, logCommandText As String, context As DbContext, commandId As Guid, connectionId As Guid, methodResult As Object, startTime As DateTimeOffset, duration As TimeSpan, commandSource As CommandSource, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Object)

Parametry

connection
IRelationalConnection

Połączenie.

command
DbCommand

Obiekt polecenia bazy danych.

logCommandText
String

Tekst polecenia, który można zarejestrować.

context
DbContext

DbContext Aktualnie używane wartości do wartości null, jeśli nie są znane.

commandId
Guid

Identyfikator korelacji skojarzony z danym DbCommandelementem .

connectionId
Guid

Identyfikator korelacji skojarzony z używanym elementem DbConnection .

methodResult
Object

Wartość zwracana z wykonania metody bazowej.

startTime
DateTimeOffset

Czas rozpoczęcia egzekucji.

duration
TimeSpan

Czas trwania wykonywania polecenia, który nie obejmuje korzystania z wyników.

commandSource
CommandSource

Źródło polecenia.

cancellationToken
CancellationToken

Element do CancellationToken obserwowania podczas oczekiwania na ukończenie zadania.

Zwraca

Wynik wykonania, który mógł zostać zmodyfikowany przez przechwytywanie.

Wyjątki

Jeśli element CancellationToken zostanie anulowany.

Dotyczy

CommandScalarExecutedAsync(IRelationalConnection, DbCommand, DbContext, Guid, Guid, Object, DateTimeOffset, TimeSpan, CommandSource, CancellationToken)

Źródło:
IRelationalCommandDiagnosticsLogger.cs
Źródło:
IRelationalCommandDiagnosticsLogger.cs
Źródło:
IRelationalCommandDiagnosticsLogger.cs
Źródło:
IRelationalCommandDiagnosticsLogger.cs

Rejestruje zdarzenie CommandExecuted .

public System.Threading.Tasks.ValueTask<object?> CommandScalarExecutedAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, object? methodResult, DateTimeOffset startTime, TimeSpan duration, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource, System.Threading.CancellationToken cancellationToken = default);
abstract member CommandScalarExecutedAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * obj * DateTimeOffset * TimeSpan * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<obj>
Public Function CommandScalarExecutedAsync (connection As IRelationalConnection, command As DbCommand, context As DbContext, commandId As Guid, connectionId As Guid, methodResult As Object, startTime As DateTimeOffset, duration As TimeSpan, commandSource As CommandSource, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Object)

Parametry

connection
IRelationalConnection

Połączenie.

command
DbCommand

Obiekt polecenia bazy danych.

context
DbContext

DbContext Aktualnie używane wartości do wartości null, jeśli nie są znane.

commandId
Guid

Identyfikator korelacji skojarzony z danym DbCommandelementem .

connectionId
Guid

Identyfikator korelacji skojarzony z używanym elementem DbConnection .

methodResult
Object

Wartość zwracana z wykonania metody bazowej.

startTime
DateTimeOffset

Czas rozpoczęcia egzekucji.

duration
TimeSpan

Czas trwania wykonywania polecenia, który nie obejmuje korzystania z wyników.

commandSource
CommandSource

Źródło polecenia.

cancellationToken
CancellationToken

Element do CancellationToken obserwowania podczas oczekiwania na ukończenie zadania.

Zwraca

Wynik wykonania, który mógł zostać zmodyfikowany przez przechwytywanie.

Wyjątki

Jeśli element CancellationToken zostanie anulowany.

Dotyczy