IDbCommandInterceptor.DataReaderClosingAsync メソッド

定義

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

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

パラメーター

command
DbCommand

コマンド。

eventData
DataReaderClosingEventData

コマンドに関するコンテキスト情報。

result
InterceptionResult

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

戻り値

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

適用対象