Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
 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));
        }