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