public async Task <ProductResponseModel> UpdateAsync(Guid id, ProductUpdateModel model)
        {
            var newProduct     = _mapper.Map <Product>(model);
            var updatedProduct = await _productService.UpdateAsync(id, newProduct);

            return(_mapper.Map <ProductResponseModel>(updatedProduct));
        }
Esempio n. 2
0
        public async Task <ProductDTO> UpdateAsync(int id, ProductDTO product)
        {
            var result = await _productService.UpdateAsync(AutoMapper.Mapper.Map <Product>(product), id);

            return(AutoMapper.Mapper.Map <ProductDTO>(result));
        }