Example #1
0
        public DbTransaction GetThreadTransaction(bool returnOnly = false)
        {
            if (returnOnly)
            {
                return(persistantTransaction);
            }

            if (persistantTransaction != null)
            {
                persistantTransaction.ReferenceCount++;

                return(persistantTransaction);
            }

            persistantTransaction = new MySqlDbTransaction(this, logger, verbose, null)
            {
                ReferenceCount = 1
            };

            return(persistantTransaction);
        }
Example #2
0
 public void ClearThreadTransaction()
 {
     persistantTransaction = null;
 }