public virtual void Connect(String connectionString) { CurrentConnection = DbProviderFactory.CreateConnection(); CurrentConnection.ConnectionString = connectionString; CurrentConnection.Open(); CurrentTransaction = CurrentConnection.BeginTransaction(); }
public void BeginTransaction() { CurrentConnection = GetDbConnection(DataSourceEnum.MASTER); if (CurrentConnection.State == ConnectionState.Closed) { CurrentConnection.Open(); } CurrentTransaction = CurrentConnection.BeginTransaction(); }
/// <summary> /// Inicia a transação. /// </summary> public void BeginTransaction() { CheckDisposed(); if (_transaction == null) { CreateConnection(); if (_isolationLevel == IsolationLevel.Unspecified) { _transaction = CurrentConnection.BeginTransaction(); } else { _transaction = CurrentConnection.BeginTransaction(_isolationLevel); } } }
public void Rollback() { CurrentTransaction.Rollback(); CurrentTransaction = CurrentConnection.BeginTransaction(); }
public void Commit() { CurrentTransaction.Commit(); CurrentTransaction = CurrentConnection.BeginTransaction(); }
public IDbTransaction BeginTransction() { Transaction = CurrentConnection.BeginTransaction(); return(Transaction); }
protected override SqlTransaction CreateTransaction() { return(CurrentConnection.BeginTransaction()); }