Esempio n. 1
0
 private void Rollback()
 {
     if (_transaction != null)
     {
         this._transaction.Rollback();
         this._transaction = null;
     }
     if (Context != null)
     {
         this.Context.Dispose();
         this.Context = null;
     }
     if (_connection != null)
     {
         this._connection.Dispose();
         this._connection = null;
     }
     this.EditMode = false;
 }
Esempio n. 2
0
 private void RecreateContext()
 {
     Context.Dispose();
     Context = new CalculationDbContext(_connection);
 }
Esempio n. 3
0
 public void BeginEdit()
 {
     this.EditMode    = true;
     this._connection = CalculationDbContext.CreateConnection();
     this.Context     = new CalculationDbContext(_connection);
 }