IDbCommandInterceptor.CommandCreating(CommandCorrelatedEventData, InterceptionResult<DbCommand>) Yöntem

Tanım

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

public Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand> CommandCreating (Microsoft.EntityFrameworkCore.Diagnostics.CommandCorrelatedEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand> result);
abstract member CommandCreating : Microsoft.EntityFrameworkCore.Diagnostics.CommandCorrelatedEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand> -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand>
Public Function CommandCreating (eventData As CommandCorrelatedEventData, result As InterceptionResult(Of DbCommand)) As InterceptionResult(Of DbCommand)

Parametreler

eventData
CommandCorrelatedEventData

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

result
InterceptionResult<DbCommand>

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<DbCommand>

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 geçirilen değeri döndürmesidir.

Şunlara uygulanır