Language

IDbConnectionInterceptor.ConnectionDisposingAsync メソッド

定義

EF が非同期コンテキストで DisposeAsync() を呼び出す直前に呼び出されます。

public virtual System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult> ConnectionDisposingAsync(System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
abstract member ConnectionDisposingAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult>
override this.ConnectionDisposingAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult>
Public Overridable Function ConnectionDisposingAsync (connection As DbConnection, eventData As ConnectionEventData, result As InterceptionResult) As ValueTask(Of InterceptionResult)

パラメーター

connection
DbConnection

接続。

eventData
ConnectionEventData

接続に関するコンテキスト情報。

result
InterceptionResult

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

戻り値

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

適用対象