TransactionHandler Class

 

Represents the base class for interceptors that handle the transaction operations. Derived classes can be registered using SetDefaultTransactionHandler or SetTransactionHandler.

Namespace:   System.Data.Entity.Infrastructure
Assembly:  EntityFramework (in EntityFramework.dll)

System.Object
  System.Data.Entity.Infrastructure.TransactionHandler
    System.Data.Entity.Infrastructure.CommitFailureHandler

public abstract class TransactionHandler : IDbTransactionInterceptor, 
	IDbConnectionInterceptor, IDbInterceptor, IDisposable

NameDescription
System_CAPS_protmethodTransactionHandler()

Initializes a new instance of the TransactionHandler class.

NameDescription
System_CAPS_pubpropertyConnection

Gets the connection for which the transaction operations will be handled.

System_CAPS_pubpropertyDbContext

Gets the context for which the transaction operations will be handled.

System_CAPS_protpropertyIsDisposed

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

System_CAPS_pubpropertyObjectContext

Gets the context for which the transaction operations will be handled.

NameDescription
System_CAPS_pubmethodBeganTransaction(DbConnection, BeginTransactionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodBeginningTransaction(DbConnection, BeginTransactionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodBuildDatabaseInitializationScript()

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

System_CAPS_pubmethodClosed(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodClosing(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodCommitted(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodCommitting(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodConnectionGetting(DbTransaction, DbTransactionInterceptionContext<DbConnection>)

Can be implemented in a derived class.

System_CAPS_pubmethodConnectionGot(DbTransaction, DbTransactionInterceptionContext<DbConnection>)

Can be implemented in a derived class.

System_CAPS_pubmethodConnectionStringGetting(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

System_CAPS_pubmethodConnectionStringGot(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

System_CAPS_pubmethodConnectionStringSet(DbConnection, DbConnectionPropertyInterceptionContext<String>)

Can be implemented in a derived class.

System_CAPS_pubmethodConnectionStringSetting(DbConnection, DbConnectionPropertyInterceptionContext<String>)

Can be implemented in a derived class.

System_CAPS_pubmethodConnectionTimeoutGetting(DbConnection, DbConnectionInterceptionContext<Int32>)

Can be implemented in a derived class.

System_CAPS_pubmethodConnectionTimeoutGot(DbConnection, DbConnectionInterceptionContext<Int32>)

Can be implemented in a derived class.

System_CAPS_pubmethodDatabaseGetting(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

System_CAPS_pubmethodDatabaseGot(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

System_CAPS_pubmethodDataSourceGetting(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

System_CAPS_pubmethodDataSourceGot(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

System_CAPS_pubmethodDispose()

Releases the resources used by this transaction handler.

System_CAPS_protmethodDispose(Boolean)

Releases the resources used by this transaction handler.

System_CAPS_pubmethodDisposed(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodDisposed(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodDisposing(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodDisposing(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodEnlistedTransaction(DbConnection, EnlistTransactionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodEnlistingTransaction(DbConnection, EnlistTransactionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodInitialize(DbContext, DbConnection)

Initializes this instance using the specified context.

System_CAPS_pubmethodInitialize(ObjectContext)

Initializes this instance using the specified context.

System_CAPS_pubmethodIsolationLevelGetting(DbTransaction, DbTransactionInterceptionContext<IsolationLevel>)

Can be implemented in a derived class.

System_CAPS_pubmethodIsolationLevelGot(DbTransaction, DbTransactionInterceptionContext<IsolationLevel>)

Can be implemented in a derived class.

System_CAPS_protmethodMatchesParentContext(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.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodOpened(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodOpening(DbConnection, DbConnectionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodRolledBack(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodRollingBack(DbTransaction, DbTransactionInterceptionContext)

Can be implemented in a derived class.

System_CAPS_pubmethodServerVersionGetting(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

System_CAPS_pubmethodServerVersionGot(DbConnection, DbConnectionInterceptionContext<String>)

Can be implemented in a derived class.

System_CAPS_pubmethodStateGetting(DbConnection, DbConnectionInterceptionContext<ConnectionState>)

Can be implemented in a derived class.

System_CAPS_pubmethodStateGot(DbConnection, DbConnectionInterceptionContext<ConnectionState>)

Can be implemented in a derived class.

System_CAPS_pubmethodToString()

(Inherited from Object.)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.