| 1234567891011121314151617181920 |
- using Application.Abstractions.Identity;
- using MediatR;
- namespace Application.Features.Director.Role.Get
- {
- public sealed class Handler(IIdentityRoleReader roleReader) : IRequestHandler<Query, Response>
- {
- public async Task<Response> Handle(Query request, CancellationToken ct)
- {
- var role = await roleReader.GetRoleAsync(request.ID, ct);
- return new Response
- {
- ID = role.ID,
- Name = role.Name,
- ClaimsCount = role.Claims.Count
- };
- }
- }
- }
|