| 1234567891011121314151617 |
- 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<GetUsers.Response> List { get; set; } = [];
- public async Task OnGetAsync(CancellationToken ct)
- {
- List = await mediator.Send(new GetUsers.Query(), ct);
- Total = List.Count;
- }
- }
- }
|