Condividi tramite


IDbCommandInterceptor.DataReaderClosingAsync Metodo

Definizione

Chiamato appena 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 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, EF continuerà come normale. Se IsSuppressed è true, EF elimina l'operazione che sta per eseguire. Un'implementazione di questo metodo per qualsiasi intercettatore che non tenta di eliminare l'operazione consiste nel restituire il result valore passato.

Si applica a