IDbCommandInterceptor.CommandCreating(CommandCorrelatedEventData, InterceptionResult<DbCommand>) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
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
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.