共用方式為


IDbTransactionInterceptor.ReleasingSavepointAsync 方法

定義

在 EF 想要釋放交易儲存點之前呼叫。

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)

參數

transaction
DbTransaction

異動。

eventData
TransactionEventData

連線和交易的相關內容資訊。

result
InterceptionResult

如果存在,則表示目前的結果。 如果某些先前的攔截器藉由呼叫 Suppress() 來隱藏執行,這個值將會 IsSuppressed 設定 true 為 。 這個值通常用來作為這個方法實作的傳回值。

cancellationToken
CancellationToken

等候 CancellationToken 工作完成時要觀察的 。

傳回

如果 IsSuppressedfalse ,則 EF 會如常繼續。 如果 IsSuppressedtrue ,EF 將會隱藏即將執行的作業。 未嘗試隱藏作業之任何攔截器的這個方法實作是傳回 result 傳入的值。

例外狀況

適用於