DbCommandInterceptor.CommandCreating 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ılmadan hemen önce çağrılır CreateCommand().
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.
Ö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 normal bir uygulaması, geçirilen değeri döndürmektir result .