public async Task <ArticleSaleDto> GetAsync(Guid id) { var result = await _repository.GetAsync(id); if (result.UserId != CurrentUser.GetId()) { throw new UserFriendlyException(L["NoPermissions"]); } return(ObjectMapper.Map <ArticleSale, ArticleSaleDto>(result)); }
public async Task <ArticleSale> GetAsync(Guid id, Guid?tenantId, bool includeDetails = true) { using (CurrentTenant.Change(tenantId)) { return(await _repository.GetAsync(id, includeDetails)); } }
public async Task <ArticleSaleDto> GetAsync(Guid id) { var result = await _repository.GetAsync(id); return(ObjectMapper.Map <ArticleSale, ArticleSaleDto>(result)); }