共用方式為


DbTransactionInterceptor.TransactionRolledBackAsync 方法

定義

在 EF 呼叫 之後立即呼叫 RollbackAsync(CancellationToken)

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
override this.TransactionRolledBackAsync : System.Data.Common.DbTransaction * Microsoft.EntityFrameworkCore.Diagnostics.TransactionEndEventData * System.Threading.CancellationToken -> System.Threading.Tasks.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

實作

例外狀況

適用於