IRelationalCommandDiagnosticsLogger.CommandReaderExecutingAsync Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Przeciążenia
CommandReaderExecutingAsync(IRelationalConnection, DbCommand, DbContext, Guid, Guid, DateTimeOffset, CommandSource, CancellationToken)
Rejestruje zdarzenie CommandExecuting .
public System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbDataReader>> CommandReaderExecutingAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, DateTimeOffset startTime, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource, System.Threading.CancellationToken cancellationToken = default);
abstract member CommandReaderExecutingAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * DateTimeOffset * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbDataReader>>
Public Function CommandReaderExecutingAsync (connection As IRelationalConnection, command As DbCommand, context As DbContext, commandId As Guid, connectionId As Guid, startTime As DateTimeOffset, commandSource As CommandSource, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of InterceptionResult(Of DbDataReader))
Parametry
- connection
- IRelationalConnection
Połączenie.
- command
- DbCommand
Obiekt polecenia bazy danych.
- connectionId
- Guid
Identyfikator korelacji skojarzony z używanym elementem DbConnection .
- startTime
- DateTimeOffset
Czas rozpoczęcia egzekucji.
- commandSource
- CommandSource
Źródło polecenia.
- cancellationToken
- CancellationToken
Element do CancellationToken obserwowania podczas oczekiwania na ukończenie zadania.
Zwraca
Przechwycony wynik.
Wyjątki
Jeśli element CancellationToken zostanie anulowany.
Dotyczy
CommandReaderExecutingAsync(IRelationalConnection, DbCommand, String, DbContext, Guid, Guid, DateTimeOffset, CommandSource, CancellationToken)
Rejestruje zdarzenie CommandExecuting .
public System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbDataReader>> CommandReaderExecutingAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, string logCommandText, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, DateTimeOffset startTime, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource, System.Threading.CancellationToken cancellationToken = default);
abstract member CommandReaderExecutingAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * string * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * DateTimeOffset * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbDataReader>>
Public Function CommandReaderExecutingAsync (connection As IRelationalConnection, command As DbCommand, logCommandText As String, context As DbContext, commandId As Guid, connectionId As Guid, startTime As DateTimeOffset, commandSource As CommandSource, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of InterceptionResult(Of DbDataReader))
Parametry
- connection
- IRelationalConnection
Połączenie.
- command
- DbCommand
Obiekt polecenia bazy danych.
- logCommandText
- String
Tekst polecenia, który można zarejestrować.
- connectionId
- Guid
Identyfikator korelacji skojarzony z używanym elementem DbConnection .
- startTime
- DateTimeOffset
Czas rozpoczęcia egzekucji.
- commandSource
- CommandSource
Źródło polecenia.
- cancellationToken
- CancellationToken
Element do CancellationToken obserwowania podczas oczekiwania na ukończenie zadania.
Zwraca
Przechwycony wynik.
Wyjątki
Jeśli element CancellationToken zostanie anulowany.