Partilhar via


IDbTransactionInterceptor.TransactionRollingBack Método

Definição

Chamado pouco antes do EF pretende chamar Rollback().

public Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult TransactionRollingBack (System.Data.Common.DbTransaction transaction, Microsoft.EntityFrameworkCore.Diagnostics.TransactionEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
public virtual Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult TransactionRollingBack (System.Data.Common.DbTransaction transaction, Microsoft.EntityFrameworkCore.Diagnostics.TransactionEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
abstract member TransactionRollingBack : System.Data.Common.DbTransaction * Microsoft.EntityFrameworkCore.Diagnostics.TransactionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
abstract member TransactionRollingBack : System.Data.Common.DbTransaction * Microsoft.EntityFrameworkCore.Diagnostics.TransactionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
override this.TransactionRollingBack : System.Data.Common.DbTransaction * Microsoft.EntityFrameworkCore.Diagnostics.TransactionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
Public Function TransactionRollingBack (transaction As DbTransaction, eventData As TransactionEventData, result As InterceptionResult) As InterceptionResult
Public Overridable Function TransactionRollingBack (transaction As DbTransaction, eventData As TransactionEventData, result As InterceptionResult) As InterceptionResult

Parâmetros

transaction
DbTransaction

A transação.

eventData
TransactionEventData

Informações contextuais sobre conexão e transação.

result
InterceptionResult

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

Retornos

Se IsSuppressed for false, o EF continuará normalmente. Se IsSuppressed for true, o EF suprimirá a operação que estava prestes a executar. Uma implementação desse método para qualquer interceptador que não esteja tentando suprimir a operação é retornar o result valor passado.

Aplica-se a