private void Cleanup(SQLiteConnection conn) { CurrentTransaction = null; conn.Close(); conn.Dispose(); _complete = true; }
public DbTransaction() { if (CurrentTransaction != null) throw new ApplicationException("There is another transaction active on this thread!"); SQLiteConnection conn = new SQLiteConnection(ConfigurationManager.ConnectionStrings[ConnectionStringName].ConnectionString); conn.Open(); _transaction = conn.BeginTransaction(); CurrentTransaction = this; }