Compartilhar via


IDbCommandInterceptor.NonQueryExecuting Método

Definição

Chamado pouco antes do EF pretende chamar ExecuteNonQuery().

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

Parâmetros

command
DbCommand

O comando.

eventData
CommandEventData

Informações contextuais sobre o comando e a execução.

result
InterceptionResult<Int32>

Representa o resultado atual se houver um. Esse valor terá HasResult definido como true se algum interceptador anterior suprimisse a execução chamando SuppressWithResult(TResult). Esse valor normalmente é usado como o valor retornado para a implementação desse método.

Retornos

Se HasResult for false, o EF continuará normalmente. Se HasResult for true, o EF suprimirá a operação que estava prestes a executar e usar Result . Uma implementação desse método para qualquer interceptador que não está tentando alterar o resultado é retornar o result valor passado.

Aplica-se a