C
C#17mo ago
peace

❔ Tell DbProviderFactory what connection string to use not working?

DbProviderFactories.RegisterFactory("System.Data.MySql", MySqlConnectorFactory.Instance);
serviceCollection.AddSingleton(DbProviderFactories.GetFactory("System.Data.MySql"));
serviceCollection.AddTransient<MySqlConnection>(provider => new MySqlConnection(config.GetConnectionString("Default")));
DbProviderFactories.RegisterFactory("System.Data.MySql", MySqlConnectorFactory.Instance);
serviceCollection.AddSingleton(DbProviderFactories.GetFactory("System.Data.MySql"));
serviceCollection.AddTransient<MySqlConnection>(provider => new MySqlConnection(config.GetConnectionString("Default")));
1 Reply
Accord
Accord17mo ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.