IDbConnectionInterceptor.ConnectionClosingAsync Metodo

Definizione

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

public System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult> ConnectionClosingAsync (System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
public System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult> ConnectionClosingAsync (System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
public virtual System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult> ConnectionClosingAsync (System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
abstract member ConnectionClosingAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult>
abstract member ConnectionClosingAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult>
abstract member ConnectionClosingAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult>
override this.ConnectionClosingAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult>
Public Function ConnectionClosingAsync (connection As DbConnection, eventData As ConnectionEventData, result As InterceptionResult) As Task(Of InterceptionResult)
Public Function ConnectionClosingAsync (connection As DbConnection, eventData As ConnectionEventData, result As InterceptionResult) As ValueTask(Of InterceptionResult)
Public Overridable Function ConnectionClosingAsync (connection As DbConnection, eventData As ConnectionEventData, result As InterceptionResult) As ValueTask(Of InterceptionResult)

Parametri

connection
DbConnection

Connessione.

eventData
ConnectionEventData

Informazioni contestuali sulla connessione.

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.

Si applica a