Share via


IDbConnectionInterceptor Interface

Definition

An object that implements this interface can be registered with DbInterception to receive notifications when Entity Framework performs operations on a DbTransaction.

public interface IDbConnectionInterceptor : System.Data.Entity.Infrastructure.Interception.IDbInterceptor
type IDbConnectionInterceptor = interface
    interface IDbInterceptor
Public Interface IDbConnectionInterceptor
Implements IDbInterceptor
Derived
Implements

Remarks

Interceptors can also be registered in the config file of the application. See http://go.microsoft.com/fwlink/?LinkId=260883 for more information about Entity Framework configuration.

Methods

BeganTransaction(DbConnection, BeginTransactionInterceptionContext)

Called after BeginTransaction(IsolationLevel) is invoked. The transaction used by Entity Framework can be changed by setting Result.

BeginningTransaction(DbConnection, BeginTransactionInterceptionContext)

Called before BeginTransaction(IsolationLevel) is invoked.

Closed(DbConnection, DbConnectionInterceptionContext)

Called after Close() is invoked.

Closing(DbConnection, DbConnectionInterceptionContext)

Called before Close() is invoked.

ConnectionStringGetting(DbConnection, DbConnectionInterceptionContext<String>)

Called before ConnectionString is retrieved.

ConnectionStringGot(DbConnection, DbConnectionInterceptionContext<String>)

Called after ConnectionString is retrieved.

ConnectionStringSet(DbConnection, DbConnectionPropertyInterceptionContext<String>)

Called after ConnectionString is set.

ConnectionStringSetting(DbConnection, DbConnectionPropertyInterceptionContext<String>)

Called before ConnectionString is set.

ConnectionTimeoutGetting(DbConnection, DbConnectionInterceptionContext<Int32>)

Called before ConnectionTimeout is retrieved.

ConnectionTimeoutGot(DbConnection, DbConnectionInterceptionContext<Int32>)

Called after ConnectionTimeout is retrieved.

DatabaseGetting(DbConnection, DbConnectionInterceptionContext<String>)

Called before Database is retrieved.

DatabaseGot(DbConnection, DbConnectionInterceptionContext<String>)

Called after Database is retrieved.

DataSourceGetting(DbConnection, DbConnectionInterceptionContext<String>)

Called before DataSource is retrieved.

DataSourceGot(DbConnection, DbConnectionInterceptionContext<String>)

Called after DataSource is retrieved.

Disposed(DbConnection, DbConnectionInterceptionContext)

Called after Dispose() is invoked.

Disposing(DbConnection, DbConnectionInterceptionContext)

Called before Dispose() is invoked.

EnlistedTransaction(DbConnection, EnlistTransactionInterceptionContext)

Called after EnlistTransaction(Transaction) is invoked.

EnlistingTransaction(DbConnection, EnlistTransactionInterceptionContext)

Called before EnlistTransaction(Transaction) is invoked.

Opened(DbConnection, DbConnectionInterceptionContext)

Called after Open() or its async counterpart is invoked.

Opening(DbConnection, DbConnectionInterceptionContext)

Called before Open() or its async counterpart is invoked.

ServerVersionGetting(DbConnection, DbConnectionInterceptionContext<String>)

Called before ServerVersion is retrieved.

ServerVersionGot(DbConnection, DbConnectionInterceptionContext<String>)

Called after ServerVersion is retrieved.

StateGetting(DbConnection, DbConnectionInterceptionContext<ConnectionState>)

Called before State is retrieved.

StateGot(DbConnection, DbConnectionInterceptionContext<ConnectionState>)

Called after State is retrieved.

Applies to