Share via


DbTransactionDispatcher Class

Definition

Used for dispatching operations to a DbTransaction such that any IDbTransactionInterceptor 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 DbTransactionDispatcher
type DbTransactionDispatcher = class
Public Class DbTransactionDispatcher
Inheritance
DbTransactionDispatcher

Remarks

This class is used internally by Entity Framework when interacting with DbTransaction. 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

Commit(DbTransaction, DbInterceptionContext)

Sends Committing(DbTransaction, DbTransactionInterceptionContext) and Committed(DbTransaction, DbTransactionInterceptionContext) to any IDbConnectionInterceptor registered on DbInterception before/after making a call to Commit().

Dispose(DbTransaction, DbInterceptionContext)

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

Equals(Object)

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

GetConnection(DbTransaction, DbInterceptionContext)

Sends ConnectionGetting(DbTransaction, DbTransactionInterceptionContext<DbConnection>) and ConnectionGot(DbTransaction, DbTransactionInterceptionContext<DbConnection>) to any IDbTransactionInterceptor registered on DbInterception before/after getting Connection.

GetHashCode()

Serves as the default hash function.

GetIsolationLevel(DbTransaction, DbInterceptionContext)

Sends IsolationLevelGetting(DbTransaction, DbTransactionInterceptionContext<IsolationLevel>) and IsolationLevelGot(DbTransaction, DbTransactionInterceptionContext<IsolationLevel>) to any IDbTransactionInterceptor registered on DbInterception before/after getting IsolationLevel.

GetType()

Gets the Type of the current instance.

Rollback(DbTransaction, DbInterceptionContext)

Sends RollingBack(DbTransaction, DbTransactionInterceptionContext) and RolledBack(DbTransaction, DbTransactionInterceptionContext) to any IDbConnectionInterceptor registered on DbInterception before/after making a call to Rollback().

ToString()

Returns a string that represents the current object.

Applies to