public IActionResult Update(int id, [FromBody] Dto.UpdateProduct productDto) { var product = ProductsRepo.GetById(id); Mapper.Map(productDto, product); ProductsRepo.Update(product); return(Ok()); }
public IActionResult UpdatedProduct(int id, Product products) { var updatedProducts = _repo.Update(id, products); return(Ok(updatedProducts)); }