C
C#2y 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
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server