Sdílet prostřednictvím


IDbTransactionInterceptor.ReleasingSavepointAsync Metoda

Definice

Volá se těsně před tím, než EF hodlá uvolnit bod uložení transakce.

public System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult> ReleasingSavepointAsync (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> ReleasingSavepointAsync (System.Data.Common.DbTransaction transaction, Microsoft.EntityFrameworkCore.Diagnostics.TransactionEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result, System.Threading.CancellationToken cancellationToken = default);
abstract member ReleasingSavepointAsync : 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 ReleasingSavepointAsync : 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.ReleasingSavepointAsync : 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 ReleasingSavepointAsync (transaction As DbTransaction, eventData As TransactionEventData, result As InterceptionResult, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of InterceptionResult)
Public Overridable Function ReleasingSavepointAsync (transaction As DbTransaction, eventData As TransactionEventData, result As InterceptionResult, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of InterceptionResult)

Parametry

transaction
DbTransaction

Transakce.

eventData
TransactionEventData

Kontextové informace o připojení a transakci.

result
InterceptionResult

Představuje aktuální výsledek, pokud existuje. Tato hodnota bude nastavená IsSuppressed na , true pokud některý předchozí zachytávací modul potlačil spuštění voláním Suppress()metody . Tato hodnota se obvykle používá jako návratová hodnota pro implementaci této metody.

cancellationToken
CancellationToken

K CancellationToken pozorování při čekání na dokončení úlohy.

Návraty

Pokud IsSuppressed je false, ef bude pokračovat jako obvykle. Pokud IsSuppressed je truehodnota , ef potlačí operaci, kterou se chysl provést. Implementace této metody pro všechny zachytávací objekty, které se nepokouší potlačit operaci, je vrácení result předané hodnoty.

Výjimky

Platí pro