Пример #1
0
        // Methods
        public DBController()
        {
            this._iDbCommandList = new List <IDbCommand>();
            this.dbes            = new DatabaseExecutiveService();
            this.dbes.SetDatabaseExecutiveServiceConnectionString();
            this.dbes.OpenConnection();
            ConnectionStringSettings settings = ConfigurationManager.ConnectionStrings[ConfigurationManager.AppSettings["defaultConnectionString"]];

            this.connectionString = settings.ConnectionString;
            this.provider         = settings.ProviderName;
        }
Пример #2
0
 public void Dispose()
 {
     if (this.dbes != null)
     {
         this.dbes.CloseConnection();
         this.dbes = null;
     }
     this.provider        = null;
     this._iDbCommandList = null;
     GC.SuppressFinalize(this);
 }
Пример #3
0
        public DBController(ConnectionStringSettings connectionStringSettings)
        {
            this._iDbCommandList = new List <IDbCommand>();
            DatabaseConnectionString connectionString = new DatabaseConnectionString();

            connectionString.ConnectionString = connectionStringSettings.ConnectionString;
            connectionString.ProviderName     = connectionStringSettings.ProviderName;
            this.dbes = new DatabaseExecutiveService();
            this.dbes.SetDatabaseExecutiveServiceConnectionString(connectionString);
            this.dbes.OpenConnection();
            this.connectionString = connectionStringSettings.ConnectionString;
            this.provider         = connectionStringSettings.ProviderName;
        }