Exemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="connection"></param>
 public DataAccessOracle(string connection, bool connect = false)
 {
     _conn = new OracleConnection(connection);
     comm  = new OracleCommand();
     comm.CommandTimeout = 0;
     comm.Connection     = _conn;
     if (connect)
     {
         if (_conn.State != ConnectionState.Open)
         {
             _conn.Open();
         }
     }
     _util = new SharedUtil();
 }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="connection"></param>
        /// <param name="dbInstance"></param>
        /// <param name="connect"></param>
        public DataAccessAll(DbConnection dbInstance, bool connect = false)
        {
            _conn = dbInstance;
            comm  = dbInstance.CreateCommand();
            comm.CommandTimeout = 0;
            comm.Connection     = _conn;

            if (connect)
            {
                if (_conn.State != ConnectionState.Open)
                {
                    _conn.Open();
                }
            }
            _util = new SharedUtil();
        }