Język

IDbCommandInterceptor.DataReaderDisposing Metoda

Definicja

Wywoływane, gdy wykonanie obiektu DbDataReader ma zostać usunięte.

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

Parametry

command
DbCommand

Polecenie.

eventData
DataReaderDisposingEventData

Kontekstowe informacje o poleceniu i czytniku.

result
InterceptionResult

Reprezentuje bieżący wynik, jeśli istnieje. Ta wartość będzie miała IsSuppressed wartość , true jeśli niektóre poprzednie przechwytujące operacje pomijane przez wywołanie metody Suppress(). Ta wartość jest zwykle używana jako wartość zwracana dla implementacji tej metody.

Zwraca

Jeśli IsSuppressed ma wartość false, program EF będzie kontynuowany normalnie. Jeśli IsSuppressed ma wartość true, program EF będzie pomijać operację, która miała być wykonywana. Implementacja tej metody dla każdego przechwytnika, który nie próbuje pominąć operacji, jest zwrócenie wartości przekazanej result .

Dotyczy