A generic Class for managing all kinds of ADO.NET Database Transactions - to be used instead of concrete ADO.NET Transaction objects, eg. OdbcTransaction or NpgsqlTransaction, etc. Effectively wraps ADO.NET Transaction objects.
More...
|
virtual void | Dispose (bool ADisposing) |
| Releases the unmanaged resources used by the TDBTransaction (these are really only resources held by the WrappedTransaction and optionally releases the managed resources of that object. More...
|
|
|
System.Guid | TransactionIdentifier [get] |
| An identifier ('Globally Unique Identifier (GUID)') that uniquely identifies a DB Transaction once it got created. It is used for internal 'sanity checks'. It also gets logged and hence can aid debugging (also useful for Unit Testing). More...
|
|
TDataBase | DataBaseObj [get] |
| Instance of TDataBase that this Transaction belongs to. More...
|
|
string | TransactionName [get] |
| Name of the DB Transaction (optional). It gets logged and hence can aid debugging (also useful for Unit Testing). More...
|
|
System.Guid | ConnectionIdentifier [get] |
| An identifier ('Globally Unique Identifier (GUID)') that uniquely identifies the DB Connection that this DB Transaction is running against. It is used for internal 'sanity checks'. It also gets logged and hence can aid debugging (also useful for Unit Testing). More...
|
|
DbConnection | Connection [get] |
| Database connection to which the Transaction belongs. More...
|
|
System.Data.IsolationLevel | IsolationLevel [get] |
| IsolationLevel of the Transaction. More...
|
|
DbTransaction | WrappedTransaction [get] |
| DbTransaction that is wrapped in an instance of this class, i.e. which the instance of this class represents. More...
|
|
bool | Valid [get] |
| True if the Transaction hasn't been Committed or Rolled Back, otherwise false. More...
|
|
string | AppDomainNameThatTransactionWasStartedIn [get] |
| Name of the AppDomain that the DB Transaction was started in. It gets logged and hence can aid debugging (also useful for Unit Testing). More...
|
|
A generic Class for managing all kinds of ADO.NET Database Transactions - to be used instead of concrete ADO.NET Transaction objects, eg. OdbcTransaction or NpgsqlTransaction, etc. Effectively wraps ADO.NET Transaction objects.
◆ TDBTransaction() [1/2]
Ict.Common.DB.TDBTransaction.TDBTransaction |
( |
| ) |
|
|
inline |
constructor for empty transaction. it can be filled with calling BeginTransaction.
◆ TDBTransaction() [2/2]
Ict.Common.DB.TDBTransaction.TDBTransaction |
( |
TDataBase |
ADataBase, |
|
|
IsolationLevel |
AIsolationLevel, |
|
|
string |
ATransactionName = "" |
|
) |
| |
|
inline |
Constructor for a TDBTransaction Object.
- Parameters
-
ADataBase | The database connection that this transaction should be created from. |
AIsolationLevel | The isolation level |
ATransactionName | Name of the DB Transaction (optional). It gets logged and hence can aid debugging (also useful for Unit Testing). |
◆ BeginTransaction()
void Ict.Common.DB.TDBTransaction.BeginTransaction |
( |
TDataBase |
ADataBase, |
|
|
IsolationLevel |
AIsolationLevel, |
|
|
string |
ATransactionName = "" |
|
) |
| |
|
inline |
◆ Commit()
void Ict.Common.DB.TDBTransaction.Commit |
( |
| ) |
|
|
inline |
◆ CopyFrom()
copy all data from existing transaction
◆ Dispose() [1/2]
void Ict.Common.DB.TDBTransaction.Dispose |
( |
| ) |
|
|
inline |
◆ Dispose() [2/2]
virtual void Ict.Common.DB.TDBTransaction.Dispose |
( |
bool |
ADisposing | ) |
|
|
inlineprotectedvirtual |
Releases the unmanaged resources used by the TDBTransaction (these are really only resources held by the WrappedTransaction and optionally releases the managed resources of that object.
- Parameters
-
ADisposing | True to release both managed and unmanaged resources; false to release only unmanaged resources. |
◆ GetDBTransactionIdentifier()
string Ict.Common.DB.TDBTransaction.GetDBTransactionIdentifier |
( |
| ) |
|
|
inline |
Returns a string containing the TransactionIdentifier. If a TransactionName was assigned when the DB Transaction was created it is included, too. Gets logged and hence can aid debugging (also useful for Unit Testing).
- Returns
- String containing the TransactionIdentifier. If a TransactionName was assigned when the DB Transaction was created it is included, too.
◆ Rollback()
void Ict.Common.DB.TDBTransaction.Rollback |
( |
| ) |
|
|
inline |
roll back the transaction
◆ AppDomainNameThatTransactionWasStartedIn
string Ict.Common.DB.TDBTransaction.AppDomainNameThatTransactionWasStartedIn |
|
get |
Name of the AppDomain that the DB Transaction was started in. It gets logged and hence can aid debugging (also useful for Unit Testing).
◆ Connection
DbConnection Ict.Common.DB.TDBTransaction.Connection |
|
get |
Database connection to which the Transaction belongs.
◆ ConnectionIdentifier
System.Guid Ict.Common.DB.TDBTransaction.ConnectionIdentifier |
|
get |
An identifier ('Globally Unique Identifier (GUID)') that uniquely identifies the DB Connection that this DB Transaction is running against. It is used for internal 'sanity checks'. It also gets logged and hence can aid debugging (also useful for Unit Testing).
◆ DataBaseObj
TDataBase Ict.Common.DB.TDBTransaction.DataBaseObj |
|
get |
Instance of TDataBase that this Transaction belongs to.
Can be used e.g. in Static Methods to get the TDataBase instance that a TDBTransaction object was instantiated on. This TDataBase instance can then be used to execute calls on the proper TDataBase instance without needing to have this instance readily in a given context (thinking of static Methods in the 'Typed DataStore' here)!
◆ IsolationLevel
System.Data.IsolationLevel Ict.Common.DB.TDBTransaction.IsolationLevel |
|
get |
◆ TransactionIdentifier
System.Guid Ict.Common.DB.TDBTransaction.TransactionIdentifier |
|
get |
An identifier ('Globally Unique Identifier (GUID)') that uniquely identifies a DB Transaction once it got created. It is used for internal 'sanity checks'. It also gets logged and hence can aid debugging (also useful for Unit Testing).
◆ TransactionName
string Ict.Common.DB.TDBTransaction.TransactionName |
|
get |
Name of the DB Transaction (optional). It gets logged and hence can aid debugging (also useful for Unit Testing).
◆ Valid
bool Ict.Common.DB.TDBTransaction.Valid |
|
get |
True if the Transaction hasn't been Committed or Rolled Back, otherwise false.
◆ WrappedTransaction
DbTransaction Ict.Common.DB.TDBTransaction.WrappedTransaction |
|
get |
DbTransaction that is wrapped in an instance of this class, i.e. which the instance of this class represents.
WARNING: Do not do anything with this Object other than inspecting it; the correct working of Transactions in the TDataBase Object relies on the fact that TDataBase manages everything about Transactions!!!
The documentation for this class was generated from the following file: