Share via


DbConnectionInterceptor Class

Definition

Abstract base class for IDbConnectionInterceptor for use when implementing a subset of the interface methods.

public abstract class DbConnectionInterceptor : Microsoft.EntityFrameworkCore.Diagnostics.IDbConnectionInterceptor, Microsoft.EntityFrameworkCore.Diagnostics.IInterceptor
type DbConnectionInterceptor = class
    interface IDbConnectionInterceptor
    interface IInterceptor
Public MustInherit Class DbConnectionInterceptor
Implements IDbConnectionInterceptor, IInterceptor
Inheritance
DbConnectionInterceptor
Implements

Remarks

See EF Core interceptors for more information and examples.

Constructors

DbConnectionInterceptor()

Methods

ConnectionClosed(DbConnection, ConnectionEndEventData)

Called just after EF has called Close() in an async context.

ConnectionClosedAsync(DbConnection, ConnectionEndEventData)

Called just after EF has called CloseAsync().

ConnectionClosing(DbConnection, ConnectionEventData, InterceptionResult)

Called just before EF intends to call Close().

ConnectionClosingAsync(DbConnection, ConnectionEventData, InterceptionResult)

Called just before EF intends to call CloseAsync() in an async context.

ConnectionCreated(ConnectionCreatedEventData, DbConnection)

Called just after EF creates a DbConnection. This event is not triggered if the application provides the connection to use.

ConnectionCreating(ConnectionCreatingEventData, InterceptionResult<DbConnection>)

Called just before EF creates a DbConnection. This event is not triggered if the application provides the connection to use.

ConnectionDisposed(DbConnection, ConnectionEndEventData)

Called just after EF has called Dispose() in an async context.

ConnectionDisposedAsync(DbConnection, ConnectionEndEventData)

Called just after EF has called DisposeAsync().

ConnectionDisposing(DbConnection, ConnectionEventData, InterceptionResult)

Called just before EF intends to call Dispose() for the DbConnection.

ConnectionDisposingAsync(DbConnection, ConnectionEventData, InterceptionResult)

Called just before EF intends to call DisposeAsync() in an async context.

ConnectionFailed(DbConnection, ConnectionErrorEventData)

Called when opening of a connection has failed with an exception.

ConnectionFailedAsync(DbConnection, ConnectionErrorEventData, CancellationToken)

Called when opening of a connection has failed with an exception.

ConnectionOpened(DbConnection, ConnectionEndEventData)

Called just after EF has called Open().

ConnectionOpenedAsync(DbConnection, ConnectionEndEventData, CancellationToken)

Called just after EF has called OpenAsync().

ConnectionOpening(DbConnection, ConnectionEventData, InterceptionResult)

Called just before EF intends to call Open().

ConnectionOpeningAsync(DbConnection, ConnectionEventData, InterceptionResult, CancellationToken)

Called just before EF intends to call OpenAsync().

Applies to