Dil

IDbCommandInterceptor.ReaderExecuting Yöntem

Tanım

EF çağrılmadan hemen önce çağrılır 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);
public 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>
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>
Public Overridable Function ReaderExecuting (command As DbCommand, eventData As CommandEventData, result As InterceptionResult(Of DbDataReader)) As InterceptionResult(Of DbDataReader)
Public Function ReaderExecuting (command As DbCommand, eventData As CommandEventData, result As InterceptionResult(Of DbDataReader)) As InterceptionResult(Of DbDataReader)

Parametreler

command
DbCommand

Komutu.

eventData
CommandEventData

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

result
InterceptionResult<DbDataReader>

Varsa geçerli sonucu temsil eder. Önceki bir kesme noktası tarafından çağrılarak trueSuppressWithResult(TResult)yürütme engellendiyse bu değer olarak ayarlanmış olacaktırHasResult. Bu değer genellikle bu yöntemin uygulanması için dönüş değeri olarak kullanılır.

Döndürülenler

HasResult False ise EF normal şekilde devam eder. HasResult True ise EF, gerçekleştirmek üzere olduğu işlemi gizler ve bunun yerine kullanırResult. Sonucu değiştirmeye çalışmayan herhangi bir kesme noktası için bu yöntemin bir uygulaması, geçirilen değeri döndürmektir result .

Şunlara uygulanır