Глобальный рефакторинг пространств имён

This commit is contained in:
2025-10-02 13:29:30 +04:00
parent d23d81fb53
commit 2fa94851cb
3176 changed files with 27146 additions and 30584 deletions
+28
View File
@@ -0,0 +1,28 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Pf2e.Database;
using Pf2e.Database.Model.Enum;
namespace Pf2e.Web.Pages;
public class IndexModel : PageModel
{
private readonly ILogger<IndexModel> _logger;
public readonly Pf2eDbContext Context;
public Dictionary<EntityType, int> Data { get; set; } = new();
public IndexModel(ILogger<IndexModel> logger, Pf2eDbContext context)
{
_logger = logger;
Context = context;
}
public void OnGet()
{
Data = Context
.Entities.GroupBy(e => e.Type)
.ToDictionary(entities => entities.Key, entities => entities.Count());
}
}