次の方法で共有


DbCommandInterceptor.DataReaderDisposing メソッド

定義

DbDataReader 実行が破棄されるときに呼び出されます。

public virtual Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult DataReaderDisposing (System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.DataReaderDisposingEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
abstract member DataReaderDisposing : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.DataReaderDisposingEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
override this.DataReaderDisposing : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.DataReaderDisposingEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
Public Overridable Function DataReaderDisposing (command As DbCommand, eventData As DataReaderDisposingEventData, result As InterceptionResult) As InterceptionResult

パラメーター

command
DbCommand

コマンド。

eventData
DataReaderDisposingEventData

コマンドとリーダーに関するコンテキスト情報。

result
InterceptionResult

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

戻り値

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

実装

適用対象