namespace Webzine.WebApplication.Areas.Administration.Controllers; using Microsoft.AspNetCore.Mvc; using Webzine.Business.Contracts; using Webzine.Business.Contracts.Dto; /// /// Contrôleur pour gérer le tableau de bord de l'administration. /// [Area("Administration")] public class DashboardController : Controller { private readonly ILogger logger; private readonly IDashboardService dashboardService; /// /// Initializes a new instance of the class. /// Initialise une nouvelle instance de la classe . /// /// Service de journalisation injecté. /// Service de calcul des statistiques du tableau de bord. public DashboardController(ILogger logger, IDashboardService dashboardService) { this.logger = logger; this.dashboardService = dashboardService; this.logger.LogInformation("Initialisation du contrôleur TitreController."); } /// /// Affiche le tableau de bord de l'administration. /// /// La vue Index du tableau de bord. public IActionResult Index() { DashboardDTO data = this.dashboardService.GetDashboardData(); return this.View(data); } }