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; }
public DatabasePokayoke(string connectionString, DbConnectionType dbType) : base() { _connectionString = connectionString; _dbType = dbType; Title = string.Format("{0} Available", DatabaseCatalog.Name(connectionString)); }