Exemplo n.º 1
0
        protected virtual DatabasesConfigurationCollection CreateDatabasesCollection()
        {
            var databases = new DatabasesConfigurationCollection();

            foreach (ConnectionStringSettings css in AppController.Instance.Configuration.Configuration.ConnectionStrings.ConnectionStrings)
            {
                databases.Add(new DatabaseConfiguration()
                {
                    Name = css.Name,
                    //ConnectionString = "name=" + css.Name,
                    ConnectionString = css.ConnectionString,
                    ProviderName     = css.ProviderName
                });
            }

            return(databases);
        }
Exemplo n.º 2
0
 public DatabaseConfigurationService(Session session)
     : base(session)
 {
     databasesConfigurations = this.CreateDatabasesCollection();
     databases = new Dictionary <string, IDatabase>();
 }