Handler.cs 413 B

12345678910111213
  1. using Application.Abstractions.Identity;
  2. using MediatR;
  3. namespace Application.Features.Director.CreateRole
  4. {
  5. public sealed class Handler(IIdentityRoleWriter roleWriter) : IRequestHandler<CreateRoleCommand>
  6. {
  7. public async Task Handle(CreateRoleCommand request, CancellationToken ct)
  8. {
  9. await roleWriter.CreateRoleAsync(request.RoleName ?? string.Empty, ct);
  10. }
  11. }
  12. }