diff --git a/LittleShop/Areas/Admin/Controllers/DashboardController.cs b/LittleShop/Areas/Admin/Controllers/DashboardController.cs index ec529a2..b78fa5e 100644 --- a/LittleShop/Areas/Admin/Controllers/DashboardController.cs +++ b/LittleShop/Areas/Admin/Controllers/DashboardController.cs @@ -11,15 +11,18 @@ public class DashboardController : Controller private readonly IOrderService _orderService; private readonly IProductService _productService; private readonly ICategoryService _categoryService; + private readonly IConfiguration _configuration; public DashboardController( IOrderService orderService, IProductService productService, - ICategoryService categoryService) + ICategoryService categoryService, + IConfiguration configuration) { _orderService = orderService; _productService = productService; _categoryService = categoryService; + _configuration = configuration; } public async Task Index() @@ -47,6 +50,9 @@ public class DashboardController : Controller ViewData["RecentOrders"] = orders.OrderByDescending(o => o.CreatedAt).Take(5); ViewData["TopProducts"] = products.OrderByDescending(p => p.StockQuantity).Take(5); + // System information + ViewData["ConnectionString"] = _configuration.GetConnectionString("DefaultConnection") ?? "Not configured"; + return View(); } } \ No newline at end of file diff --git a/LittleShop/Areas/Admin/Views/Dashboard/Index.cshtml b/LittleShop/Areas/Admin/Views/Dashboard/Index.cshtml index 58cb064..1647b47 100644 --- a/LittleShop/Areas/Admin/Views/Dashboard/Index.cshtml +++ b/LittleShop/Areas/Admin/Views/Dashboard/Index.cshtml @@ -228,6 +228,7 @@ else