using Microsoft.AspNetCore.Mvc.RazorPages; using MediatR; namespace Admin.Pages.Director.User { public class IndexModel(IMediator mediator) : PageModel { public int Total { get; set; } = 0; public List List { get; set; } = []; public async Task OnGetAsync(CancellationToken ct) { List = await mediator.Send(new GetUsers.Query(), ct); Total = List.Count; } } }