DbCommandInterceptor.ScalarExecuting(DbCommand, CommandEventData, InterceptionResult<Object>) Yöntem

Tanım

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

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

Parametreler

command
DbCommand

Komut.

eventData
CommandEventData

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

result
InterceptionResult<Object>

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.

Döndürülenler

InterceptionResult<Object>

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