public async Task <Unit> Handle(DeleteRoleCommand request, CancellationToken cancellationToken) { await _roleDomainEntity.GetAsync(request.Id, cancellationToken); await _roleDomainEntity.DeleteAsync(cancellationToken); return(Unit.Value); }
public async Task <Unit> Handle(UpdateRoleCommand request, CancellationToken cancellationToken) { await _roleDomainEntity.GetAsync(request.Id, cancellationToken); _roleDomainEntity.MapFrom(request, _mapper); await _roleDomainEntity.UpdateAsync(cancellationToken); return(Unit.Value); }