Esempio n. 1
0
 public override void BeginTransaction()
 {
     if (_currentState != ConnectionState.Open)
     {
         Open();
     }
     _transaction = _connection.BeginTransaction();
 }
Esempio n. 2
0
 public override void BeginTransaction()
 {
     Logger.Info("Begin transaction " + _connectionString);
     if (_currentState != ConnectionState.Open)
     {
         Open();
     }
     _transaction = _connection.BeginTransaction();
 }
Esempio n. 3
0
 /// <summary>
 /// Start a transaction
 /// </summary>
 public static bool BeginTransaction()
 {
     Monitor.Enter(_translock);
     if (_trans == null && conn.State == ConnectionState.Open)
     {
         _trans = conn.BeginTransaction();
         return(true);
     }
     Monitor.Exit(_translock);
     return(false);
 }
 public void BeginTransaction()
 {
     if (_connection != null)
     {
         _transaction = _connection.BeginTransaction();
     }
     else
     {
         throw new InvalidOperationException("You must have a valid connection object before calling BeginTransaction.");
     }
 }