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