DbCommandInterceptor.NonQueryExecuting(DbCommand, CommandEventData, InterceptionResult<Int32>) Yöntem

Tanım

EF çağrısı yapmak için hemen önce ExecuteNonQuery() çağrılır.

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

Parametreler

command
DbCommand

Komut.

eventData
CommandEventData

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

result
InterceptionResult<Int32>

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

InterceptionResult<Int32>

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 değeri genellikle kullanarak result geri dönmektir FromResult<TResult>(TResult)

Uygulamalar

Şunlara uygulanır