EasyRepository/GenericUnitOfWork.cs
/// <inheritdoc />
/// <summary>
///   The rollback transaction returns the context to the inital state it
///   was when BeginTransaction() was called.
/// </summary>
/// <exception cref="Exception">
///   Thrown when an error occurs rolling back a transaction.
/// </exception>
The rollback transaction returns the context to the inital state it
was when BeginTransaction() was called.
The rollback transaction returns the context to the inital state it was when BeginTransaction () was called .
public void RollbackTransaction()
        {
            try
            {
                if (this.transactionScope != null)
                {
                    this.transactionScope.Rollback();
                    this.transactionScope.Dispose();
                    this.transactionScope = null;
                }
            }
            catch (Exception ex)
            {
                throw new Exception(
                    $"An error occured during the Rollback transaction.\r\n{ex.Message}");
            }
        }
public void RollbackTransaction ( ) { try { if ( this . transactionScope != null ) { this . transactionScope . Rollback ( ) ; this . transactionScope . Dispose ( ) ; this . transactionScope = null ; } } catch ( Exception ex ) { throw new Exception ( $" An error occured during the Rollback transaction. \r \n { ex . Message } " ) ; } }
The rollback transaction returns the context to the inital state it
was when BeginTransaction() was called.
The rollback transaction returns the context to the inital state it was when BeginTransaction () was called .
Thrown when an error occurs rolling back a transaction.
Thrown when an error occurs rolling back a transaction .
inheritdoc
None