public ActionResult <ProductReview> GetReviewById(int id) { ProductReview review = dao.Get(id); if (review == null) { return(NotFound()); } return(Ok(review)); }
public ActionResult <Item> GetItemById(int id) { Item item = dao.Get(id); if (item == null) { return(NotFound()); } return(Ok(item)); }
public ActionResult <ProductReview> GetReviewById(int id) { // See if the review exist ProductReview review = dao.Get(id); // If it does not, return 404 if (review == null) { return(NotFound()); } // If it does, return 200 return(Ok(review)); }