Beispiel #1
0
 void ITransactedSqlConnection.BeginTransaction()
 {
     if (Transaction.IsNull())
     {
         Transaction = GetConnection().BeginTransaction();
     }
 }
Beispiel #2
0
 /// <summary>
 /// Start a transaction.
 /// </summary>
 /// <exception cref="ApplicationException">Thrown if a transaction is already active.</exception>
 public void BeginTransaction()
 {
     if (_transaction.IsNull())
     {
         _transaction = Connection.BeginTransaction();
     }
     else
     {
         throw new ApplicationException("Transaction already active.");
     }
 }