peace
peace
CC#
Created by peace on 2/25/2023 in #help
❔ 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")));
2 replies
CC#
Created by peace on 2/24/2023 in #help
✅ Code Review
I'm a little worried I am not following SOLID and best practices to the best ability: https://www.reddit.com/r/csharp/comments/11awajl/c_complex_web_scraper_looking_for_feedback_code/
2 replies
CC#
Created by peace on 2/20/2023 in #help
❔ Best architectural design choice?
If I have multiple instances of multiple apps all working to do similar things, and they all need these "accounts" I store in a MySQL database, but only one app can have one of them at a time, and once an app has used one it can't be used again for 30 minutes after being initially used last. What is the best way to implement concurrent thread-safe access? I feel like row or table locking the database via queries would cause a lot of issues?
4 replies