DbCommandInterceptor.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 çağrısı yapmak için hemen önce CreateCommand() çağrılır.
public virtual 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>
override this.CommandCreating : Microsoft.EntityFrameworkCore.Diagnostics.CommandCorrelatedEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand> -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand>
Public Overridable 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>
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
false ise EF normal HasResult şekilde devam eder.
true HasResult ise EF, gerçekleştirmek üzere olduğu işlemi bastırarak bunun yerine Result kullanır.
Sonucu değiştirmeye çalışan herhangi bir kesme noktası için bu yöntemin normal bir uygulaması, geçirilen result değerin geri dönmesidir.