Condividi tramite


DbCommandInterceptor.DataReaderClosingAsync Metodo

Definizione

Chiamato subito prima che EF intenda chiamare CloseAsync() in un contesto asincrono.

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

Parametri

command
DbCommand

Comando.

eventData
DataReaderClosingEventData

Informazioni contestuali sul comando.

result
InterceptionResult

Rappresenta il risultato corrente, se presente. Questo valore sarà IsSuppressed impostato su true se un precedente intercettore 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, Entity Framework continuerà come di consueto. Se IsSuppressed è true, Entity Framework elimina l'operazione che sta per eseguire. Un'implementazione di questo metodo per qualsiasi intercettore che non tenta di eliminare l'operazione consiste nel restituire il result valore passato.

Implementazioni

Si applica a