Compartir a través de


IDbConnectionInterceptor.ConnectionOpenedAsync Método

Definición

Se llama justo después de que EF haya llamado a 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

Parámetros

connection
DbConnection

La conexión.

eventData
ConnectionEndEventData

Información contextual sobre la conexión.

cancellationToken
CancellationToken

que CancellationToken se va a observar mientras espera a que se complete la tarea.

Devoluciones

Tarea Task que representa la operación asincrónica.

Excepciones

Se aplica a