TransactionHandler TransactionHandler 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
TransactionHandlerTransactionHandlerTransactionHandler
Derived
Implements

Constructors

TransactionHandler() TransactionHandler() TransactionHandler()

Initializes a new instance of the TransactionHandler class.

Properties

Connection Connection Connection

Gets the connection.

DbContext DbContext DbContext

Gets the context.

IsDisposed IsDisposed IsDisposed

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

ObjectContext ObjectContext ObjectContext

Gets the context.

Methods

BeganTransaction(DbConnection, BeginTransactionInterceptionContext) BeganTransaction(DbConnection, BeginTransactionInterceptionContext) BeganTransaction(DbConnection, BeginTransactionInterceptionContext)

Can be implemented in a derived class.

BeginningTransaction(DbConnection, BeginTransactionInterceptionContext) BeginningTransaction(DbConnection, BeginTransactionInterceptionContext) BeginningTransaction(DbConnection, BeginTransactionInterceptionContext)

Can be implemented in a derived class.

BuildDatabaseInitializationScript() BuildDatabaseInitializationScript() BuildDatabaseInitializationScript()

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

Closed(DbConnection, DbConnectionInterceptionContext) Closed(DbConnection, DbConnectionInterceptionContext) Closed(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

Closing(DbConnection, DbConnectionInterceptionContext) Closing(DbConnection, DbConnectionInterceptionContext) Closing(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

Committed(DbTransaction, DbTransactionInterceptionContext) Committed(DbTransaction, DbTransactionInterceptionContext) Committed(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

Committing(DbTransaction, DbTransactionInterceptionContext) Committing(DbTransaction, DbTransactionInterceptionContext) Committing(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

ConnectionGetting(DbTransaction, DbTransactionInterceptionContext<DbConnection>) ConnectionGetting(DbTransaction, DbTransactionInterceptionContext<DbConnection>) ConnectionGetting(DbTransaction, DbTransactionInterceptionContext<DbConnection>)

Can be implemented in a derived class.

ConnectionGot(DbTransaction, DbTransactionInterceptionContext<DbConnection>) ConnectionGot(DbTransaction, DbTransactionInterceptionContext<DbConnection>) ConnectionGot(DbTransaction, DbTransactionInterceptionContext<DbConnection>)

Can be implemented in a derived class.

ConnectionStringGetting(DbConnection, DbConnectionInterceptionContext<String>) ConnectionStringGetting(DbConnection, DbConnectionInterceptionContext<String>) ConnectionStringGetting(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

ConnectionStringGot(DbConnection, DbConnectionInterceptionContext<String>) ConnectionStringGot(DbConnection, DbConnectionInterceptionContext<String>) ConnectionStringGot(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

ConnectionStringSet(DbConnection, DbConnectionPropertyInterceptionContext<String>) ConnectionStringSet(DbConnection, DbConnectionPropertyInterceptionContext<String>) ConnectionStringSet(DbConnection, DbConnectionPropertyInterceptionContext<String>)

Can be implemented in a derived class.

ConnectionStringSetting(DbConnection, DbConnectionPropertyInterceptionContext<String>) ConnectionStringSetting(DbConnection, DbConnectionPropertyInterceptionContext<String>) ConnectionStringSetting(DbConnection, DbConnectionPropertyInterceptionContext<String>)

Can be implemented in a derived class.

ConnectionTimeoutGetting(DbConnection, DbConnectionInterceptionContext<Int32>) ConnectionTimeoutGetting(DbConnection, DbConnectionInterceptionContext<Int32>) ConnectionTimeoutGetting(DbConnection, DbConnectionInterceptionContext<Int32>)

Can be implemented in a derived class.

ConnectionTimeoutGot(DbConnection, DbConnectionInterceptionContext<Int32>) ConnectionTimeoutGot(DbConnection, DbConnectionInterceptionContext<Int32>) ConnectionTimeoutGot(DbConnection, DbConnectionInterceptionContext<Int32>)

Can be implemented in a derived class.

DatabaseGetting(DbConnection, DbConnectionInterceptionContext<String>) DatabaseGetting(DbConnection, DbConnectionInterceptionContext<String>) DatabaseGetting(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

DatabaseGot(DbConnection, DbConnectionInterceptionContext<String>) DatabaseGot(DbConnection, DbConnectionInterceptionContext<String>) DatabaseGot(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

DataSourceGetting(DbConnection, DbConnectionInterceptionContext<String>) DataSourceGetting(DbConnection, DbConnectionInterceptionContext<String>) DataSourceGetting(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

DataSourceGot(DbConnection, DbConnectionInterceptionContext<String>) DataSourceGot(DbConnection, DbConnectionInterceptionContext<String>) DataSourceGot(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Releases the resources used by this transaction handler.

Dispose() Dispose() Dispose()
Disposed(DbConnection, DbConnectionInterceptionContext) Disposed(DbConnection, DbConnectionInterceptionContext) Disposed(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

Disposed(DbTransaction, DbTransactionInterceptionContext) Disposed(DbTransaction, DbTransactionInterceptionContext) Disposed(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

Disposing(DbConnection, DbConnectionInterceptionContext) Disposing(DbConnection, DbConnectionInterceptionContext) Disposing(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

Disposing(DbTransaction, DbTransactionInterceptionContext) Disposing(DbTransaction, DbTransactionInterceptionContext) Disposing(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

EnlistedTransaction(DbConnection, EnlistTransactionInterceptionContext) EnlistedTransaction(DbConnection, EnlistTransactionInterceptionContext) EnlistedTransaction(DbConnection, EnlistTransactionInterceptionContext)

Can be implemented in a derived class.

EnlistingTransaction(DbConnection, EnlistTransactionInterceptionContext) EnlistingTransaction(DbConnection, EnlistTransactionInterceptionContext) EnlistingTransaction(DbConnection, EnlistTransactionInterceptionContext)

Can be implemented in a derived class.

Initialize(ObjectContext) Initialize(ObjectContext) Initialize(ObjectContext)

Initializes this instance using the specified context.

Initialize(DbContext, DbConnection) Initialize(DbContext, DbConnection) Initialize(DbContext, DbConnection)

Initializes this instance using the specified context.

IsolationLevelGetting(DbTransaction, DbTransactionInterceptionContext<IsolationLevel>) IsolationLevelGetting(DbTransaction, DbTransactionInterceptionContext<IsolationLevel>) IsolationLevelGetting(DbTransaction, DbTransactionInterceptionContext<IsolationLevel>)

Can be implemented in a derived class.

IsolationLevelGot(DbTransaction, DbTransactionInterceptionContext<IsolationLevel>) IsolationLevelGot(DbTransaction, DbTransactionInterceptionContext<IsolationLevel>) IsolationLevelGot(DbTransaction, DbTransactionInterceptionContext<IsolationLevel>)

Can be implemented in a derived class.

MatchesParentContext(DbConnection, DbInterceptionContext) MatchesParentContext(DbConnection, DbInterceptionContext) 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) Opened(DbConnection, DbConnectionInterceptionContext) Opened(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

Opening(DbConnection, DbConnectionInterceptionContext) Opening(DbConnection, DbConnectionInterceptionContext) Opening(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

RolledBack(DbTransaction, DbTransactionInterceptionContext) RolledBack(DbTransaction, DbTransactionInterceptionContext) RolledBack(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

RollingBack(DbTransaction, DbTransactionInterceptionContext) RollingBack(DbTransaction, DbTransactionInterceptionContext) RollingBack(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

ServerVersionGetting(DbConnection, DbConnectionInterceptionContext<String>) ServerVersionGetting(DbConnection, DbConnectionInterceptionContext<String>) ServerVersionGetting(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

ServerVersionGot(DbConnection, DbConnectionInterceptionContext<String>) ServerVersionGot(DbConnection, DbConnectionInterceptionContext<String>) ServerVersionGot(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

StateGetting(DbConnection, DbConnectionInterceptionContext<ConnectionState>) StateGetting(DbConnection, DbConnectionInterceptionContext<ConnectionState>) StateGetting(DbConnection, DbConnectionInterceptionContext<ConnectionState>)

Can be implemented in a derived class.

StateGot(DbConnection, DbConnectionInterceptionContext<ConnectionState>) StateGot(DbConnection, DbConnectionInterceptionContext<ConnectionState>) StateGot(DbConnection, DbConnectionInterceptionContext<ConnectionState>)

Can be implemented in a derived class.

Applies to