public ActionResult Delete(int id) { Item item = dao.Get(id); if (item == null) { return(NotFound()); } dao.Delete(id); return(NoContent()); }
public ActionResult Delete(int id) { ProductReview review = dao.Get(id); if (review == null) { return(NotFound()); } dao.Delete(id); return(NoContent()); }
public ActionResult Delete(int id) { // See if the review exists ProductReview review = dao.Get(id); // If it does not, return 404 if (review == null) { return(NotFound()); } // Delete from the DAO dao.Delete(id); // Return 204 return(NoContent()); }