IDbConnectionInterceptor.ConnectionFailedAsync Method     
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called when closing of a connection has failed with an exception.
public System.Threading.Tasks.Task ConnectionFailedAsync(System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionErrorEventData eventData, System.Threading.CancellationToken cancellationToken = default);public virtual System.Threading.Tasks.Task ConnectionFailedAsync(System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionErrorEventData eventData, System.Threading.CancellationToken cancellationToken = default);abstract member ConnectionFailedAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionErrorEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Taskabstract member ConnectionFailedAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionErrorEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.ConnectionFailedAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionErrorEventData * System.Threading.CancellationToken -> System.Threading.Tasks.TaskPublic Function ConnectionFailedAsync (connection As DbConnection, eventData As ConnectionErrorEventData, Optional cancellationToken As CancellationToken = Nothing) As TaskPublic Overridable Function ConnectionFailedAsync (connection As DbConnection, eventData As ConnectionErrorEventData, Optional cancellationToken As CancellationToken = Nothing) As TaskParameters
- connection
- DbConnection
The connection.
- eventData
- ConnectionErrorEventData
Contextual information about the connection.
- cancellationToken
- CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Returns
A Task representing the asynchronous operation.
Exceptions
If the CancellationToken is canceled.