Partager via


IDbTransactionInterceptor.TransactionFailedAsync Méthode

Définition

Appelé lorsque l’utilisation d’un DbTransaction a échoué avec une exception.

public System.Threading.Tasks.Task TransactionFailedAsync (System.Data.Common.DbTransaction transaction, Microsoft.EntityFrameworkCore.Diagnostics.TransactionErrorEventData eventData, System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.Task TransactionFailedAsync (System.Data.Common.DbTransaction transaction, Microsoft.EntityFrameworkCore.Diagnostics.TransactionErrorEventData eventData, System.Threading.CancellationToken cancellationToken = default);
abstract member TransactionFailedAsync : System.Data.Common.DbTransaction * Microsoft.EntityFrameworkCore.Diagnostics.TransactionErrorEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
abstract member TransactionFailedAsync : System.Data.Common.DbTransaction * Microsoft.EntityFrameworkCore.Diagnostics.TransactionErrorEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.TransactionFailedAsync : System.Data.Common.DbTransaction * Microsoft.EntityFrameworkCore.Diagnostics.TransactionErrorEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function TransactionFailedAsync (transaction As DbTransaction, eventData As TransactionErrorEventData, Optional cancellationToken As CancellationToken = Nothing) As Task
Public Overridable Function TransactionFailedAsync (transaction As DbTransaction, eventData As TransactionErrorEventData, Optional cancellationToken As CancellationToken = Nothing) As Task

Paramètres

transaction
DbTransaction

Transaction.

eventData
TransactionErrorEventData

Informations contextuelles sur la connexion et la transaction.

cancellationToken
CancellationToken

CancellationToken à observer en attendant la fin de la tâche.

Retours

Task représentant l’opération asynchrone.

Exceptions

S’applique à