Share via


DbTransactionInterceptor.ReleasingSavepointAsync メソッド

定義

EF がトランザクション セーブポイントを解放する直前に呼び出されます。

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>
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 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

現在の結果が存在する場合は、その結果を表します。 以前のインターセプターで IsSuppressed を呼び出Suppress()して実行が抑制された場合、この値は にtrue設定されます。 この値は、通常、このメソッドの実装の戻り値として使用されます。

cancellationToken
CancellationToken

CancellationTokenタスクの完了を待機している間に観察する 。

戻り値

falseの場合IsSuppressed、EF は通常どおり続行されます。 が trueの場合IsSuppressed、EF は実行しようとしていた操作を抑制します。 操作を抑制しようとしていないインターセプターに対するこのメソッドの実装は、渡された値を result 返すことです。

実装

適用対象