Ejemplo 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;
 }
Ejemplo n.º 2
0
 private void RecreateContext()
 {
     Context.Dispose();
     Context = new CalculationDbContext(_connection);
 }
Ejemplo n.º 3
0
 public void BeginEdit()
 {
     this.EditMode    = true;
     this._connection = CalculationDbContext.CreateConnection();
     this.Context     = new CalculationDbContext(_connection);
 }