C# Class PetShop.Data.TransactionManager

TransactionManager is utility class that decorates a IDbTransaction instance.
Inheritance: ITransactionManager, IDisposable
ファイルを表示 Open project: netTiers/netTiers Class Usage Examples

Public Methods

Method Description
BeginTransaction ( ) : void

Begins a transaction.

The default IsolationLevel mode is ReadCommitted

BeginTransaction ( IsolationLevel isolationLevel ) : void

Begins a transaction.

Commit ( ) : void

Commit the transaction to the datasource.

Dispose ( ) : void

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

Rollback ( ) : void

Rollback the transaction.

TransactionManager ( string connectionString ) : System

Initializes a new instance of the TransactionManager class.

TransactionManager ( string connectionString, string providerInvariantName ) : System

Initializes a new instance of the TransactionManager class.

Private Methods

Method Description
TransactionManager ( ) : System

Initializes a new instance of the TransactionManager class.

Method Details

BeginTransaction() public method

Begins a transaction.
The default IsolationLevel mode is ReadCommitted
If a transaction is already open.
public BeginTransaction ( ) : void
return void

BeginTransaction() public method

Begins a transaction.
If a transaction is already open.
public BeginTransaction ( IsolationLevel isolationLevel ) : void
isolationLevel IsolationLevel The level of the transaction
return void

Commit() public method

Commit the transaction to the datasource.
If a transaction is not open.
public Commit ( ) : void
return void

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Rollback() public method

Rollback the transaction.
If a transaction is not open.
public Rollback ( ) : void
return void

TransactionManager() public method

Initializes a new instance of the TransactionManager class.
public TransactionManager ( string connectionString ) : System
connectionString string The connection string to the database.
return System

TransactionManager() public method

Initializes a new instance of the TransactionManager class.
public TransactionManager ( string connectionString, string providerInvariantName ) : System
connectionString string The connection string to the database.
providerInvariantName string Name of the provider invariant.
return System