Condividi tramite


IDbCommandInterceptor.ReaderExecuting Metodo

Definizione

Chiamato subito prima che EF intenda chiamare ExecuteReader().

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

Parametri

command
DbCommand

Comando.

eventData
CommandEventData

Informazioni contestuali sul comando e sull'esecuzione.

result
InterceptionResult<DbDataReader>

Rappresenta il risultato corrente, se presente. Questo valore sarà HasResult impostato su true se un precedente intercettore ha eliminato l'esecuzione chiamando SuppressWithResult(TResult). Questo valore viene in genere usato come valore restituito per l'implementazione di questo metodo.

Restituisce

Se HasResult è false, Entity Framework continuerà come di consueto. Se HasResult è true, EF elimina invece l'operazione che sta per eseguire e usare Result . Un'implementazione di questo metodo per qualsiasi intercettore che non tenta di modificare il risultato consiste nel restituire il result valore passato.

Si applica a