public async Task <ActionResult> PutFridgeProductDetail(int id, [FromBody] CartProduct product) { if (id != product.Id) { return(BadRequest()); } var db_prod = await _cartproductService.Get(id); if (db_prod != null) { await _cartproductService.Update(product); return(Ok(product)); } return(NotFound()); }