Vérification production
continuous-integration/drone/push Build is passing Details

deploiement
Clement CHIEU 1 year ago
parent 9b30ed1234
commit 509b0d7565

@ -37,7 +37,14 @@ builder.Services.AddScoped<ISuccessService<SuccessDto>, SuccessDataServiceApi>()
builder.Services.AddScoped<ILessonService<LessonEntity>, LessonDataService>(); builder.Services.AddScoped<ILessonService<LessonEntity>, LessonDataService>();
builder.Services.AddScoped<ILessonService<LessonDto>, LessonDataServiceApi>(); builder.Services.AddScoped<ILessonService<LessonDto>, LessonDataServiceApi>();
builder.Services.AddDbContext<DbContext, UserDbContext>(); builder.Services.AddDbContext<UserDbContext>(options =>
{
if (builder.Environment.IsProduction())
{
throw new Exception("I am in production mode");
}
throw new Exception("I am in development mode");
});
builder.Services.AddDbContext<WebAPIDbContext>(options => options.UseInMemoryDatabase("appDb")); builder.Services.AddDbContext<WebAPIDbContext>(options => options.UseInMemoryDatabase("appDb"));
builder.Services.AddIdentityApiEndpoints<IdentityUser>().AddEntityFrameworkStores<WebAPIDbContext>(); builder.Services.AddIdentityApiEndpoints<IdentityUser>().AddEntityFrameworkStores<WebAPIDbContext>();

Loading…
Cancel
Save