語言

IDbCommandInterceptor.DataReaderDisposing 方法

定義

當執行 a DbDataReader 即將被處置時被召喚。

public virtual Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult DataReaderDisposing(System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.DataReaderDisposingEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
public 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
abstract member 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
Public Function DataReaderDisposing (command As DbCommand, eventData As DataReaderDisposingEventData, result As InterceptionResult) As InterceptionResult

參數

command
DbCommand

命令。

eventData
DataReaderDisposingEventData

關於指令與讀取器的上下文資訊。

result
InterceptionResult

代表目前的結果(若存在)。 若先前攔截器透過呼叫 Suppress()抑制執行,則該值將設IsSuppressed為 。true 此值通常用作此方法實作的回傳值。

傳回

若 IsSuppressed , false則 EF 將照常繼續。 若 IsSuppressed , true則 EF 將抑制它即將執行的操作。 對於任何未嘗試抑制該操作的攔截器,此方法的實作是回傳 result 傳入的值。

適用於