Condividi tramite


DbCommandInterceptor.DataReaderDisposing Metodo

Definizione

Chiamato quando l'esecuzione di un DbDataReader oggetto sta per essere eliminata.

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

Parametri

command
DbCommand

Comando.

eventData
DataReaderDisposingEventData

Informazioni contestuali sul comando e sul lettore.

result
InterceptionResult

Rappresenta il risultato corrente se esiste. Questo valore sarà IsSuppressed impostato su true se un intercettatore precedente ha eliminato l'esecuzione chiamando Suppress(). Questo valore viene in genere usato come valore restituito per l'implementazione di questo metodo.

Restituisce

Se IsSuppressed è false, l'EF continuerà come normale. Se IsSuppressed è true, EF elimina l'operazione che sta per eseguire. Una normale implementazione di questo metodo per qualsiasi intercettatore che non tenta di eliminare l'operazione consiste nel restituire il result valore passato.

Implementazioni

Si applica a