Method ConnectionOpeningAsync
- Namespace
 - Innova.Data.Entity.Configuration
 
- Assembly
 - Innova.Data.dll
 
ConnectionOpeningAsync(DbConnection, ConnectionEventData, InterceptionResult, CancellationToken)
Called just before EF intends to call OpenAsync().
public Task<InterceptionResult> ConnectionOpeningAsync(DbConnection connection, ConnectionEventData eventData, InterceptionResult result, CancellationToken cancellationToken = default)
Parameters
connectionDbConnectionThe connection.
eventDataConnectionEventDataContextual information about the connection.
resultInterceptionResultRepresents the current result if one exists. This value will have IsSuppressed set to true if some previous interceptor suppressed execution by calling Suppress(). This value is typically used as the return value for the implementation of this method.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<InterceptionResult>
 If IsSuppressed is false, the EF will continue as normal. If IsSuppressed is true, then EF will suppress the operation it was about to perform. A normal implementation of this method for any interceptor that is not attempting to suppress the operation is to return the
resultvalue passed in.