IDbCommandInterceptor.ReaderExecutingAsync(DbCommand, CommandEventData, InterceptionResult<DbDataReader>, CancellationToken) Yöntem

Tanım

EF 'in çağrılması için yeterlidir ExecuteReaderAsync() .

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

Parametreler

command
DbCommand

Komut.

eventData
CommandEventData

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

result
InterceptionResult<DbDataReader>

Bir varsa geçerli sonucu temsil eder. Bu değer, HasResult true bazı önceki bir yakalayıcıyı çağırarak yürütülecektir olarak ayarlanır SuppressWithResult(TResult) . Bu değer genellikle bu yöntemin uygulanması için dönüş değeri olarak kullanılır.

cancellationToken
CancellationToken

CancellationTokenGörevin tamamlanması beklenirken gözlemlenemedi.

Döndürülenler

Task<InterceptionResult<DbDataReader>>
ValueTask<InterceptionResult<DbDataReader>>

HasResultYanlış ise, EF normal olarak devam eder. HasResultTrue Ise EF, yerine getirmek ve kullanmak üzere olduğu işlemi bastırır Result . Bu yöntemin, sonucu değiştirmeye çalışan her bir şifre için normal bir uygulama, result genellikle FromResult<TResult>(TResult)

Özel durumlar

Şunlara uygulanır