IDbCommandInterceptor.ReaderExecutedAsync Yöntem

Tanım

EF çağrısı yaptıktan hemen sonra çağrılır ExecuteReaderAsync().

public System.Threading.Tasks.Task<System.Data.Common.DbDataReader> ReaderExecutedAsync (System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData eventData, System.Data.Common.DbDataReader result, System.Threading.CancellationToken cancellationToken = default);
public System.Threading.Tasks.ValueTask<System.Data.Common.DbDataReader> ReaderExecutedAsync (System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData eventData, System.Data.Common.DbDataReader result, System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.ValueTask<System.Data.Common.DbDataReader> ReaderExecutedAsync (System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData eventData, System.Data.Common.DbDataReader result, System.Threading.CancellationToken cancellationToken = default);
abstract member ReaderExecutedAsync : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData * System.Data.Common.DbDataReader * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.Common.DbDataReader>
abstract member ReaderExecutedAsync : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData * System.Data.Common.DbDataReader * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Data.Common.DbDataReader>
abstract member ReaderExecutedAsync : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData * System.Data.Common.DbDataReader * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Data.Common.DbDataReader>
override this.ReaderExecutedAsync : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData * System.Data.Common.DbDataReader * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Data.Common.DbDataReader>
Public Function ReaderExecutedAsync (command As DbCommand, eventData As CommandExecutedEventData, result As DbDataReader, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DbDataReader)
Public Function ReaderExecutedAsync (command As DbCommand, eventData As CommandExecutedEventData, result As DbDataReader, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of DbDataReader)
Public Overridable Function ReaderExecutedAsync (command As DbCommand, eventData As CommandExecutedEventData, result As DbDataReader, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of DbDataReader)

Parametreler

command
DbCommand

Komut.

eventData
CommandExecutedEventData

Komut ve yürütme hakkında bağlamsal bilgiler.

result
DbDataReader

çağrısının ExecuteReaderAsync()sonucu. Bu değer genellikle bu yöntemin uygulanması için dönüş değeri olarak kullanılır.

cancellationToken
CancellationToken

CancellationToken Görevin tamamlanmasını beklerken gözlemlemek için bir.

Döndürülenler

Task EF'nin kullanacağı sonucu sağlayan. Sonucu değiştirmeye çalışmayan herhangi bir kesme noktası için bu yöntemin bir uygulaması, genellikle kullanarak geçirilen değeri döndürmektir resultFromResult<TResult>(TResult)

Özel durumlar

Açıklamalar

Bir kesme noktası içindeki bir komutun ReaderExecutingAsync(DbCommand, CommandEventData, InterceptionResult<DbDataReader>, CancellationToken)yürütülmesini engellediyse bu yöntem hala çağrılır. Bu durumda, result tarafından ReaderExecutingAsync(DbCommand, CommandEventData, InterceptionResult<DbDataReader>, CancellationToken)döndürülen sonuç olur.

Şunlara uygulanır