Пример #1
0
        public async Task <ProductDto> UpdateAsync(Guid id, UpdateProductDto input)
        {
            var product = await _productRepository.GetAsync(id);

            product.SetName(input.Name);
            product.SetPrice(input.Price);
            product.SetStockCount(input.StockCount);

            return(ObjectMapper.Map <Product, ProductDto>(product));
        }
Пример #2
0
 public Task <ProductDto> UpdateAsync(Guid id, UpdateProductDto input)
 {
     return(_productAppService.UpdateAsync(id, input));
 }