Share via


TransactionHandler Class

Definition

The base class for interceptors that handle the transaction operations. Derived classes can be registered using SetDefaultTransactionHandler(Func<TransactionHandler>) or SetTransactionHandler(String, Func<TransactionHandler>, String).

public abstract class TransactionHandler : IDisposable, System.Data.Entity.Infrastructure.Interception.IDbConnectionInterceptor, System.Data.Entity.Infrastructure.Interception.IDbTransactionInterceptor
type TransactionHandler = class
    interface IDbTransactionInterceptor
    interface IDbConnectionInterceptor
    interface IDbInterceptor
    interface IDisposable
Public MustInherit Class TransactionHandler
Implements IDbConnectionInterceptor, IDbTransactionInterceptor, IDisposable
Inheritance
TransactionHandler
Derived
Implements

Constructors

TransactionHandler()

Initializes a new instance of the TransactionHandler class.

Properties

Connection

Gets the connection.

DbContext

Gets the context.

IsDisposed

Gets or sets a value indicating whether this transaction handler is disposed.

ObjectContext

Gets the context.

Methods

BeganTransaction(DbConnection, BeginTransactionInterceptionContext)

Can be implemented in a derived class.

BeginningTransaction(DbConnection, BeginTransactionInterceptionContext)

Can be implemented in a derived class.

BuildDatabaseInitializationScript()

When implemented in a derived class returns the script to prepare the database for this transaction handler.

Closed(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

Closing(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

Committed(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

Committing(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

ConnectionGetting(DbTransaction, DbTransactionInterceptionContext<DbConnection>)

Can be implemented in a derived class.

ConnectionGot(DbTransaction, DbTransactionInterceptionContext<DbConnection>)

Can be implemented in a derived class.

ConnectionStringGetting(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

ConnectionStringGot(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

ConnectionStringSet(DbConnection, DbConnectionPropertyInterceptionContext<String>)

Can be implemented in a derived class.

ConnectionStringSetting(DbConnection, DbConnectionPropertyInterceptionContext<String>)

Can be implemented in a derived class.

ConnectionTimeoutGetting(DbConnection, DbConnectionInterceptionContext<Int32>)

Can be implemented in a derived class.

ConnectionTimeoutGot(DbConnection, DbConnectionInterceptionContext<Int32>)

Can be implemented in a derived class.

DatabaseGetting(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

DatabaseGot(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

DataSourceGetting(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

DataSourceGot(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Dispose(Boolean)

Releases the resources used by this transaction handler.

Disposed(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

Disposed(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

Disposing(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

Disposing(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

EnlistedTransaction(DbConnection, EnlistTransactionInterceptionContext)

Can be implemented in a derived class.

EnlistingTransaction(DbConnection, EnlistTransactionInterceptionContext)

Can be implemented in a derived class.

Initialize(DbContext, DbConnection)

Initializes this instance using the specified context.

Initialize(ObjectContext)

Initializes this instance using the specified context.

IsolationLevelGetting(DbTransaction, DbTransactionInterceptionContext<IsolationLevel>)

Can be implemented in a derived class.

IsolationLevelGot(DbTransaction, DbTransactionInterceptionContext<IsolationLevel>)

Can be implemented in a derived class.

MatchesParentContext(DbConnection, DbInterceptionContext)

Checks whether the supplied interception context contains the target context or the supplied connection is the same as the one used by the target context.

Opened(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

Opening(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

RolledBack(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

RollingBack(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

ServerVersionGetting(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

ServerVersionGot(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

StateGetting(DbConnection, DbConnectionInterceptionContext<ConnectionState>)

Can be implemented in a derived class.

StateGot(DbConnection, DbConnectionInterceptionContext<ConnectionState>)

Can be implemented in a derived class.

Applies to