DbConnectionInterceptor.ConnectionOpenedAsync Méthode

Définition

Appelé juste après qu’EF ait appelé OpenAsync().

public virtual System.Threading.Tasks.Task ConnectionOpenedAsync (System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEndEventData eventData, System.Threading.CancellationToken cancellationToken = default);
abstract member ConnectionOpenedAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEndEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.ConnectionOpenedAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEndEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function ConnectionOpenedAsync (connection As DbConnection, eventData As ConnectionEndEventData, Optional cancellationToken As CancellationToken = Nothing) As Task

Paramètres

connection
DbConnection

Connexion.

eventData
ConnectionEndEventData

Informations contextuelles sur la connexion.

cancellationToken
CancellationToken

CancellationToken à observer en attendant la fin de la tâche.

Retours

Task représentant l’opération asynchrone.

Implémente

Exceptions

S’applique à