Share via


IDbCommandInterceptor.NonQueryExecuted Method

Definition

Called immediately after EF calls ExecuteNonQuery().

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

Parameters

command
DbCommand

The command.

eventData
CommandExecutedEventData

Contextual information about the command and execution.

result
Int32

The result of the call to ExecuteNonQuery(). This value is typically used as the return value for the implementation of this method.

Returns

The result that EF will use. An implementation of this method for any interceptor that is not attempting to change the result is to return the result value passed in.

Remarks

This method is still called if an interceptor suppressed execution of a command in NonQueryExecuting(DbCommand, CommandEventData, InterceptionResult<Int32>). In this case, result is the result returned by NonQueryExecuting(DbCommand, CommandEventData, InterceptionResult<Int32>).

Applies to