Esempio n. 1
0
        public void RollBack()
        {
            bool isLock = false;

            try
            {
                LockHelper.EnterWriteLock(Transaction.Connection.ConnectionString, timeout);
                isLock = true;
                Transaction.Rollback();
            }
            finally
            {
                if (isLock)
                {
                    LockHelper.ExitWirteLock(Transaction.Connection.ConnectionString);
                }
            }
        }
Esempio n. 2
0
        public static int ExecuteNonQuery(SQLiteConnection connection, CommandType commandType, string commandText, params SQLiteParameter[] commandParameters)
        {
            bool isLock = false;

            try
            {
                LockHelper.EnterWriteLock(connection.ConnectionString, timeout);
                isLock = true;
                int result = SQLiteHelper.ExecuteNonQuery(connection, commandType, commandText, commandParameters);
                return(result);
            }
            finally
            {
                if (isLock)
                {
                    LockHelper.ExitWirteLock(connection.ConnectionString);
                }
            }
        }