public IActionResult UpdateCart(Cart cart) { try { cartService.UpdateCart(cart); return(CreatedAtAction("UpdateCart", cart)); } catch (Exception) { return(BadRequest()); } }