From d70ca44c54ac48d456cf2734428b566c533bca39 Mon Sep 17 00:00:00 2001 From: dave Date: Thu, 14 Mar 2024 23:06:59 +0100 Subject: [PATCH] :tada: :tada: Fuck tout ceux qui croyais pas en moi :tada::tada: --- src/HeartTrackAPI/AppBootstrap.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/HeartTrackAPI/AppBootstrap.cs b/src/HeartTrackAPI/AppBootstrap.cs index c8e3603..fdbe6a0 100644 --- a/src/HeartTrackAPI/AppBootstrap.cs +++ b/src/HeartTrackAPI/AppBootstrap.cs @@ -61,8 +61,6 @@ public class AppBootstrap(IConfiguration configuration) services.AddDbContext(options => options.UseMySql($"{connectionString}", new MySqlServerVersion(new Version(10, 11, 1))) , ServiceLifetime.Singleton); - services.AddSingleton(provider => new DbDataManager(provider.GetRequiredService())); - break; default: connectionString = Configuration.GetConnectionString("HeartTrackAuthConnection"); @@ -102,7 +100,9 @@ public class AppBootstrap(IConfiguration configuration) private void AddModelService(IServiceCollection services) { //services.AddSingleton(provider => new DbDataManager(provider.GetService())); - services.AddSingleton(); + //services.AddSingleton(); + services.AddSingleton(provider => new DbDataManager(provider.GetRequiredService())); + //services.AddTransient(); }