public async Task RemoveRole(RemoveRoleCommand command, CancellationToken cancellationToken) { if (command == null) { throw new ArgumentNullException(nameof(command)); } command.EnsureIsValid(); var role = await authorizationRepository.GetRoleById(command.Id, cancellationToken).ConfigureAwait(false); if (role is null) { throw new BusinessException(Messages.RoleNotFound); } await authorizationRepository.RemoveRole(role, cancellationToken).ConfigureAwait(false); }