public static void PopulateStaticConnectionStrings(this IConfiguration configuration) { foreach (var connectionString in configuration.GetSection("ConnectionStrings").GetChildren().AsEnumerable()) { ConnectionStrings.AddConnectionString(connectionString.Key, connectionString.Value); } }