CI.
continuous-integration/drone/push Build is passing Details

pull/10/head
David D'ALMEIDA 1 year ago
parent fe29cce7e2
commit e9088d303f

@ -1,5 +1,4 @@
using DbContextLib; using DbContextLib;
using HeartTrackAPI;
using HeartTrackAPI.Utils; using HeartTrackAPI.Utils;
using StubbedContextLib; using StubbedContextLib;

@ -1,7 +1,6 @@
using System.Reflection; using System.Reflection;
using DbContextLib; using DbContextLib;
using DbContextLib.Identity; using DbContextLib.Identity;
using HeartTrackAPI.Utils;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc.ApiExplorer; using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Versioning; using Microsoft.AspNetCore.Mvc.Versioning;
@ -14,7 +13,7 @@ using StubAPI;
using StubbedContextLib; using StubbedContextLib;
using Swashbuckle.AspNetCore.SwaggerGen; using Swashbuckle.AspNetCore.SwaggerGen;
namespace HeartTrackAPI; namespace HeartTrackAPI.Utils;
public class AppBootstrap(IConfiguration configuration) public class AppBootstrap(IConfiguration configuration)
{ {
private IConfiguration Configuration { get; } = configuration; private IConfiguration Configuration { get; } = configuration;
@ -48,8 +47,7 @@ public class AppBootstrap(IConfiguration configuration)
connectionString = $"Server={host};port={port};database={database};user={username};password={password}"; connectionString = $"Server={host};port={port};database={database};user={username};password={password}";
Console.WriteLine("========RUNNING USING THE MYSQL SERVER=============="); Console.WriteLine("========RUNNING USING THE MYSQL SERVER==============");
Console.WriteLine(connectionString); Console.WriteLine(connectionString);
Console.WriteLine(connectionString); Console.WriteLine("====================================================");
Console.WriteLine("======================");
services.AddDbContext<AuthDbContext>(options => options.UseInMemoryDatabase("AuthDb")); services.AddDbContext<AuthDbContext>(options => options.UseInMemoryDatabase("AuthDb"));
services.AddDbContext<HeartTrackContext>(options => services.AddDbContext<HeartTrackContext>(options =>
options.UseMySql($"{connectionString}", new MySqlServerVersion(new Version(10, 11, 1))) options.UseMySql($"{connectionString}", new MySqlServerVersion(new Version(10, 11, 1)))
@ -89,8 +87,6 @@ public class AppBootstrap(IConfiguration configuration)
services.AddSingleton<IDataManager>(provider => new DbDataManager(provider.GetRequiredService<TrainingStubbedContext>())); services.AddSingleton<IDataManager>(provider => new DbDataManager(provider.GetRequiredService<TrainingStubbedContext>()));
break; break;
} }
//services.AddTransient<IActivityManager, ActivityManager>();
} }
private void AddIdentityServices(IServiceCollection services) private void AddIdentityServices(IServiceCollection services)

Loading…
Cancel
Save