Aracılığıyla paylaş


IDbTransactionInterceptor.TransactionRollingBackAsync Yöntem

Tanım

EF çağrısı yapmadan hemen önce çağrılır RollbackAsync(CancellationToken).

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

Parametreler

transaction
DbTransaction

İşlem.

eventData
TransactionEventData

Bağlantı ve işlem hakkında bağlamsal bilgiler.

result
InterceptionResult

Varsa geçerli sonucu temsil eder. Önceki bir kesme noktası tarafından çağrılarak trueSuppress()yürütme engellendiyse bu değer IsSuppressed olarak ayarlanır. Bu değer genellikle bu yöntemin uygulanması için dönüş değeri olarak kullanılır.

cancellationToken
CancellationToken

CancellationToken Görevin tamamlanmasını beklerken gözlemlemek için bir.

Döndürülenler

ise IsSuppressedfalseEF normal şekilde devam eder. ise IsSuppressedtrueEF, gerçekleştirmek üzere olduğu işlemi bastırır. İşlemi engellemeye çalışmayan herhangi bir kesme noktası için bu yöntemin uygulanması, geçirilen değeri döndürmektir result .

Özel durumlar

Şunlara uygulanır