Jazyk

IDbCommandInterceptor.NonQueryExecuting Metoda

Definice

Volal těsně před EF hodlá volat ExecuteNonQuery().

public virtual Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<int> NonQueryExecuting(System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.CommandEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<int> result);
public 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>
abstract member 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)
Public Function NonQueryExecuting (command As DbCommand, eventData As CommandEventData, result As InterceptionResult(Of Integer)) As InterceptionResult(Of Integer)

Parametry

command
DbCommand

Příkaz.

eventData
CommandEventData

Kontextové informace o příkazu a spuštění

result
InterceptionResult<Int32>

Představuje aktuální výsledek, pokud existuje. Tato hodnota bude nastavena HasResult , true pokud některé předchozí zachytávání potlačí provádění voláním SuppressWithResult(TResult). Tato hodnota se obvykle používá jako návratová hodnota pro implementaci této metody.

Návraty

Pokud HasResult je hodnota false, ef bude pokračovat v normálním stavu. Pokud HasResult je pravda, ef potlačí operaci, kterou se chystá provést a použít Result . Implementace této metody pro jakýkoli průsečík, který se nepokouší změnit výsledek, je vrátit result hodnotu předanou.

Platí pro