NLite.Data.DbConnectionWrapper.DisposeTransaction C# (CSharp) Method

DisposeTransaction() protected method

protected DisposeTransaction ( ) : void
return void
        protected virtual void DisposeTransaction()
        {
            if (transaction != null && !transaction.WasCommitted && !transaction.WasRolledBack)
            {
                try
                {
                    transaction.Commit();
                }
                catch
                {
                    try
                    {
                        transaction.Rollback();
                    }
                    catch
                    {
                    }
            #if DEBUG
                    throw;
            #endif
                }
                finally
                {
                    transaction.Dispose();
                    transaction = null;
                }
            }
        }