DbCommandInterceptor.ReaderExecuting(DbCommand, CommandEventData, InterceptionResult<DbDataReader>) Yöntem

Tanım

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

public virtual Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbDataReader> ReaderExecuting (System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.CommandEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbDataReader> result);
abstract member ReaderExecuting : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbDataReader> -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbDataReader>
override this.ReaderExecuting : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbDataReader> -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbDataReader>
Public Overridable Function ReaderExecuting (command As DbCommand, eventData As CommandEventData, result As InterceptionResult(Of DbDataReader)) As InterceptionResult(Of DbDataReader)

Parametreler

command
DbCommand

Komut.

eventData
CommandEventData

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

result
InterceptionResult<DbDataReader>

Varsa geçerli sonucu temsil eder. Bu değer, önceki HasResult bir kesme true noktası çağrılarak yürütmeyi bastırmışsa olarak SuppressWithResult(TResult) ayarlanmıştır. Bu değer genellikle bu yöntemin uygulanması için dönüş değeri olarak kullanılır.

Döndürülenler

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)

Uygulamalar

Şunlara uygulanır