public async Task UpdateProduct(Guid id, CreateUpdateProductDto input) { var fileName = GetImageName(input); //await StorageImageAsync(input, fileName); var product = new Product(id) { Name = input.Name, Price = input.Price, Image = fileName }; await productDomainService.UpdateProduct(id, product); }
public ProductResponse UpdateProduct(Guid id, [FromBody] ProductRequest request) { var model = request.MapFromRequest(); return(_productDomainService.UpdateProduct(id, model).MapToResponse()); }
public bool UpdateProduct(ProductDto product) { return(_productDomainService.UpdateProduct(product.ToProductDomain())); }