Ejemplo n.º 1
0
 /// <inheritdoc/>
 public void RollbackTransaction()
 {
     lock (_lock)
     {
         if (Transaction == null)
         {
             throw new ApplicationException("There is no transaction to roll back.");
         }
         Transaction.Rollback();
         Transaction = null;
     }
     TransactionConsumed?.Invoke(this, null);
 }
Ejemplo n.º 2
0
 /// <inheritdoc/>
 public void CommitTransaction()
 {
     lock (_lock)
     {
         if (Transaction == null)
         {
             throw new ApplicationException("There is no transaction to commit.");
         }
         Transaction.Commit();
         Transaction = null;
     }
     TransactionConsumed?.Invoke(this, null);
 }