Udostępnij za pośrednictwem


IDbConnectionInterceptor.ConnectionOpenedAsync Metoda

Definicja

Wywołana tuż po wywołaniu programu EF.OpenAsync()

public System.Threading.Tasks.Task ConnectionOpenedAsync (System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEndEventData eventData, System.Threading.CancellationToken cancellationToken = default);
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
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 Function ConnectionOpenedAsync (connection As DbConnection, eventData As ConnectionEndEventData, Optional cancellationToken As CancellationToken = Nothing) As Task
Public Overridable Function ConnectionOpenedAsync (connection As DbConnection, eventData As ConnectionEndEventData, Optional cancellationToken As CancellationToken = Nothing) As Task

Parametry

connection
DbConnection

Połączenie.

eventData
ConnectionEndEventData

Kontekstowe informacje o połączeniu.

cancellationToken
CancellationToken

Element CancellationToken do obserwowania podczas oczekiwania na ukończenie zadania.

Zwraca

Reprezentująca Task operację asynchroniczną.

Wyjątki

Jeśli element CancellationToken zostanie anulowany.

Dotyczy