public AbpDbConnectionsOptions Configure(IConfiguration configuration) { var dbConnectionConfigurations = configuration.GetSection("DbConnections") .Get <Dictionary <string, DbConnectionConfiguration> >(); foreach (var dbConnectionConfigurationKv in dbConnectionConfigurations) { DbConnections.Configure(dbConnectionConfigurationKv.Key, c => { c.DatabaseProvider = dbConnectionConfigurationKv.Value.DatabaseProvider; c.ConnectionString = dbConnectionConfigurationKv.Value.ConnectionString; }); } var databaseProviders = configuration.GetSection("DatabaseProviders")? .Get <List <DatabaseProvider> >(); if (databaseProviders != null) { foreach (var databaseProvider in databaseProviders) { DatabaseProviders.AddIfNotContains(databaseProvider); } } return(this); }