Exemplo n.º 1
0
        //public static DataManager Instance
        //{
        //    get
        //    {
        //        if (_instance == null)
        //        {
        //            _instance = new DataManager();
        //        }
        //        return _instance;
        //    }
        //}

        //private static DataManager _instance;

        public DataManager(string ConnectionString, string providerName)
        {
            connectionString             = ConnectionString;
            this.providerName            = providerName;
            factory                      = DbProviderFactories.GetFactory(providerName);
            _connection                  = factory.CreateConnection();
            _connection.ConnectionString = connectionString;
            _data = new DAC(_connection, this.providerName);
        }
Exemplo n.º 2
0
 public DataManager(DbConnection Connection, string providerName)
 {
     _connection       = Connection;
     this.providerName = providerName;
     _data             = new DAC(_connection, this.providerName);
 }