DbConnectionDispatcher Class

Definition

Used for dispatching operations to a DbConnection such that any IDbConnectionInterceptor registered on DbInterception will be notified before and after the operation executes. Instances of this class are obtained through the the Dispatch fluent API.

public class DbConnectionDispatcher
type DbConnectionDispatcher = class
Public Class DbConnectionDispatcher
Inheritance
DbConnectionDispatcher

Remarks

This class is used internally by Entity Framework when interacting with DbConnection. It is provided publicly so that code that runs outside of the core EF assemblies can opt-in to command interception/tracing. This is typically done by EF providers that are executing commands on behalf of EF.

Methods

BeginTransaction(DbConnection, BeginTransactionInterceptionContext)

Sends BeginningTransaction(DbConnection, BeginTransactionInterceptionContext) and BeganTransaction(DbConnection, BeginTransactionInterceptionContext) to any IDbConnectionInterceptor registered on DbInterception before/after making a call to BeginTransaction(IsolationLevel).

Close(DbConnection, DbInterceptionContext)

Sends Closing(DbConnection, DbConnectionInterceptionContext) and Closed(DbConnection, DbConnectionInterceptionContext) to any IDbConnectionInterceptor registered on DbInterception before/after making a call to Close().

Dispose(DbConnection, DbInterceptionContext)

Sends Disposing(DbConnection, DbConnectionInterceptionContext) and Disposed(DbConnection, DbConnectionInterceptionContext) to any IDbConnectionInterceptor registered on DbInterception before/after making a call to Dispose().

EnlistTransaction(DbConnection, EnlistTransactionInterceptionContext)

Sends EnlistingTransaction(DbConnection, EnlistTransactionInterceptionContext) and EnlistedTransaction(DbConnection, EnlistTransactionInterceptionContext) to any IDbConnectionInterceptor registered on DbInterception before/after making a call to EnlistTransaction(Transaction).

Equals(Object)

Determines whether the specified object is equal to the current object.

GetConnectionString(DbConnection, DbInterceptionContext)

Sends ConnectionStringGetting(DbConnection, DbConnectionInterceptionContext<String>) and ConnectionStringGot(DbConnection, DbConnectionInterceptionContext<String>) to any IDbConnectionInterceptor registered on DbInterception before/after getting ConnectionString.

GetConnectionTimeout(DbConnection, DbInterceptionContext)

Sends ConnectionTimeoutGetting(DbConnection, DbConnectionInterceptionContext<Int32>) and ConnectionTimeoutGot(DbConnection, DbConnectionInterceptionContext<Int32>) to any IDbConnectionInterceptor registered on DbInterception before/after getting ConnectionTimeout.

GetDatabase(DbConnection, DbInterceptionContext)

Sends DatabaseGetting(DbConnection, DbConnectionInterceptionContext<String>) and DatabaseGot(DbConnection, DbConnectionInterceptionContext<String>) to any IDbConnectionInterceptor registered on DbInterception before/after getting Database.

GetDataSource(DbConnection, DbInterceptionContext)

Sends DataSourceGetting(DbConnection, DbConnectionInterceptionContext<String>) and DataSourceGot(DbConnection, DbConnectionInterceptionContext<String>) to any IDbConnectionInterceptor registered on DbInterception before/after getting DataSource.

GetHashCode()

Serves as the default hash function.

GetServerVersion(DbConnection, DbInterceptionContext)

Sends ServerVersionGetting(DbConnection, DbConnectionInterceptionContext<String>) and ServerVersionGot(DbConnection, DbConnectionInterceptionContext<String>) to any IDbConnectionInterceptor registered on DbInterception before/after getting ServerVersion.

GetState(DbConnection, DbInterceptionContext)

Sends StateGetting(DbConnection, DbConnectionInterceptionContext<ConnectionState>) and StateGot(DbConnection, DbConnectionInterceptionContext<ConnectionState>) to any IDbConnectionInterceptor registered on DbInterception before/after getting State.

GetType()

Gets the Type of the current instance.

Open(DbConnection, DbInterceptionContext)

Sends Opening(DbConnection, DbConnectionInterceptionContext) and Opened(DbConnection, DbConnectionInterceptionContext) to any IDbConnectionInterceptor registered on DbInterception before/after making a call to Open().

OpenAsync(DbConnection, DbInterceptionContext, CancellationToken)

Sends Opening(DbConnection, DbConnectionInterceptionContext) and Opened(DbConnection, DbConnectionInterceptionContext) to any IDbConnectionInterceptor registered on DbInterception before/after making a call to Open().

SetConnectionString(DbConnection, DbConnectionPropertyInterceptionContext<String>)

Sends ConnectionStringSetting(DbConnection, DbConnectionPropertyInterceptionContext<String>) and ConnectionStringSet(DbConnection, DbConnectionPropertyInterceptionContext<String>) to any IDbConnectionInterceptor registered on DbInterception before/after setting ConnectionString.

ToString()

Returns a string that represents the current object.

Applies to