Handler.cs 411 B

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