|
|
@ -59,7 +59,8 @@ public class AppBootstrap(IConfiguration configuration)
|
|
|
|
Console.WriteLine($"server={HOST};port={PORT};database={DATABASE};user={USERNAME};password={PASSWORD}");
|
|
|
|
Console.WriteLine($"server={HOST};port={PORT};database={DATABASE};user={USERNAME};password={PASSWORD}");
|
|
|
|
Console.WriteLine(connectionString);
|
|
|
|
Console.WriteLine(connectionString);
|
|
|
|
services.AddDbContext<HeartTrackContext>(options =>
|
|
|
|
services.AddDbContext<HeartTrackContext>(options =>
|
|
|
|
options.UseSqlite(connectionString), ServiceLifetime.Singleton);
|
|
|
|
options.UseMySql($"{connectionString}", new MySqlServerVersion(new Version(10, 11, 1)))
|
|
|
|
|
|
|
|
, ServiceLifetime.Singleton);
|
|
|
|
services.AddSingleton<IDataManager>(provider => new DbDataManager(provider.GetRequiredService<HeartTrackContext>()));
|
|
|
|
services.AddSingleton<IDataManager>(provider => new DbDataManager(provider.GetRequiredService<HeartTrackContext>()));
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|