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 | |
TransactionManager< C, T > | GetManager (string database) |
Gets the TransactionManager object for the specified database. More... | |
TransactionManager< C, T > | GetManager (string database, string label) |
Gets the TransactionManager object for the specified database. More... | |
TransactionManager< C, T > | GetManager (string database, bool isDatabaseName) |
Gets the TransactionManager object for the specified database. More... | |
TransactionManager< C, T > | GetManager (string database, bool isDatabaseName, string label) |
Gets the TransactionManager object for the specified database. More... | |
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... | |
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... | |
Properties inherited from Csla.Core.IUseApplicationContext | |
ApplicationContext | ApplicationContext [getset] |
Gets or sets the current ApplicationContext 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 38 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 200 of file TransactionManager.cs.
void Csla.Data.TransactionManager< C, T >.Dispose | ( | ) |
Dispose object, dereferencing or disposing the connection it is managing.
Definition at line 258 of file TransactionManager.cs.
TransactionManager< C, T > Csla.Data.TransactionManager< C, T >.GetManager | ( | string | database | ) |
Gets the TransactionManager object for the specified database.
database | Database name as shown in the config file. |
Definition at line 58 of file TransactionManager.cs.
TransactionManager< C, T > Csla.Data.TransactionManager< C, T >.GetManager | ( | string | database, |
bool | isDatabaseName | ||
) |
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 90 of file TransactionManager.cs.
TransactionManager< C, T > Csla.Data.TransactionManager< C, T >.GetManager | ( | string | database, |
bool | isDatabaseName, | ||
string | label | ||
) |
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 110 of file TransactionManager.cs.
TransactionManager< C, T > Csla.Data.TransactionManager< C, T >.GetManager | ( | string | database, |
string | label | ||
) |
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 71 of file TransactionManager.cs.
|
get |
Gets a reference to the current ADO.NET connection object that is associated with current trasnaction.
Definition at line 183 of file TransactionManager.cs.
|
get |
Gets the current reference count for this object.
Definition at line 214 of file TransactionManager.cs.
|
get |
Gets a reference to the current ADO.NET transaction object.
Definition at line 170 of file TransactionManager.cs.