Provides an automated way to reuse open database connections and associated ADO.NET transactions within the context of a single data portal operation. More...
Public Member Functions | |
void | Commit () |
Indicates that the current transactional scope has completed successfully. More... | |
void | Dispose () |
Dispose object, dereferencing or disposing the connection it is managing. More... | |
Static Public Member Functions | |
static TransactionManager< C, T > | GetManager (string database) |
Gets the TransactionManager object for the specified database. More... | |
static TransactionManager< C, T > | GetManager (string database, string label) |
Gets the TransactionManager object for the specified database. More... | |
static TransactionManager< C, T > | GetManager (string database, bool isDatabaseName) |
Gets the TransactionManager object for the specified database. More... | |
static TransactionManager< C, T > | GetManager (string database, bool isDatabaseName, string label) |
Gets the TransactionManager object for the specified database. More... | |
Properties | |
T | Transaction [get] |
Gets a reference to the current ADO.NET transaction object. More... | |
C | Connection [get] |
Gets a reference to the current ADO.NET connection object that is associated with current trasnaction. More... | |
int | RefCount [get] |
Gets the current reference count for this object. More... | |
Provides an automated way to reuse open database connections and associated ADO.NET transactions within the context of a single data portal operation.
C | Type of database connection object to use. |
T | Type of ADO.NET transaction object to use. |
This type stores the open ADO.NET transaction in Csla.ApplicationContext.LocalContext and uses reference counting through IDisposable to keep the transaction open for reuse by child objects, and to automatically dispose the transaction when the last consumer has called Dispose."
C | : | IDbConnection | |
C | : | new() | |
T | : | IDbTransaction |
Definition at line 37 of file TransactionManager.cs.
void Csla.Data.TransactionManager< C, T >.Commit | ( | ) |
Indicates that the current transactional scope has completed successfully.
If all transactional scopes complete successfully the transaction will commit when the TransactionManager object is disposed.
Definition at line 196 of file TransactionManager.cs.
void Csla.Data.TransactionManager< C, T >.Dispose | ( | ) |
Dispose object, dereferencing or disposing the connection it is managing.
Definition at line 254 of file TransactionManager.cs.
|
static |
Gets the TransactionManager object for the specified database.
database | Database name as shown in the config file. |
Definition at line 54 of file TransactionManager.cs.
|
static |
Gets the TransactionManager object for the specified database.
database | The database name or connection string. |
isDatabaseName | True to indicate that the Transaction string should be retrieved from the config file. If False, the database parameter is directly used as a Transaction string. |
Definition at line 86 of file TransactionManager.cs.
|
static |
Gets the TransactionManager object for the specified database.
database | The database name or connection string. |
isDatabaseName | True to indicate that the Transaction string should be retrieved from the config file. If False, the database parameter is directly used as a Transaction string. |
label | Label for this transaction. |
Definition at line 106 of file TransactionManager.cs.
|
static |
Gets the TransactionManager object for the specified database.
database | Database name as shown in the config file. |
label | Label for this transaction. |
Definition at line 67 of file TransactionManager.cs.
|
get |
Gets a reference to the current ADO.NET connection object that is associated with current trasnaction.
Definition at line 179 of file TransactionManager.cs.
|
get |
Gets the current reference count for this object.
Definition at line 210 of file TransactionManager.cs.
|
get |
Gets a reference to the current ADO.NET transaction object.
Definition at line 166 of file TransactionManager.cs.