feat: implémenter le service de tableau de bord et DTO pour les statistiques du tableau de bord
This commit is contained in:
@@ -6,6 +6,8 @@ using Microsoft.EntityFrameworkCore;
|
||||
using NLog;
|
||||
using NLog.Web;
|
||||
|
||||
using Webzine.Business;
|
||||
using Webzine.Business.Contracts;
|
||||
using Webzine.EntitiesContext;
|
||||
using Webzine.Entity;
|
||||
using Webzine.Entity.Fixtures;
|
||||
@@ -67,6 +69,8 @@ try
|
||||
builder.Services.AddSingleton<InMemoryDataStore>();
|
||||
}
|
||||
|
||||
builder.Services.AddScoped<IDashboardService, DashboardService>();
|
||||
|
||||
// https://learn.microsoft.com/fr-fr/aspnet/core/performance/response-compression?view=aspnetcore-10.0#configuration
|
||||
// Ajoute le service de compression des réponses HTTP pour réduire la taille des données envoyées au client et améliorer les performances de l'application.
|
||||
builder.Services.AddResponseCompression();
|
||||
@@ -78,6 +82,8 @@ try
|
||||
using (var scope = app.Services.CreateScope())
|
||||
{
|
||||
var db = scope.ServiceProvider.GetRequiredService<WebzineDbContext>();
|
||||
db.Database.EnsureCreated();
|
||||
|
||||
if (shouldSeed)
|
||||
{
|
||||
db.Database.EnsureDeleted();
|
||||
|
||||
Reference in New Issue
Block a user