public ActionResult <CartItemDTO> GetById(int id) { //Invalid id is negative id if (id <= 0) { return(NotFound()); } if (_service.GetCartItem(id) == null) { return(NotFound()); } _service.GetCartItem(id); return(Ok(_service.GetCartItem(id))); }