IDbTransactionInterceptor.TransactionRolledBackAsync 方法

定义

在 EF 调用 后立即调用 RollbackAsync(CancellationToken)

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

参数

transaction
DbTransaction

事务。

eventData
TransactionEndEventData

有关连接和事务的上下文信息。

cancellationToken
CancellationToken

等待 CancellationToken 任务完成时要观察的 。

返回

表示异步操作的 Task

例外

适用于