Exemplo n.º 1
0
        public string GetConnectionString(DatabaseCatalog databaseCatalog)
        {
            var connectionString = ConfigurationManager.ConnectionStrings[databaseCatalog.ToString()];

            if (connectionString == null)
            {
                throw new ApplicationConfigurationException($"Requested connection string for {databaseCatalog.ToString()} not found.");
            }

            return(connectionString.ConnectionString);
        }
 public Something(IOptions <DatabaseCatalog> dbsc)
 {
     _dbsc = dbsc.Value;
 }
Exemplo n.º 3
0
 public DatabasePokayoke(string connectionString, DbConnectionType dbType) : base()
 {
     _connectionString = connectionString; _dbType = dbType; Title = string.Format("{0} Available", DatabaseCatalog.Name(connectionString));
 }