// GET: Order/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OrderEntity orderEntity = db.Find(id); if (orderEntity == null) { return(HttpNotFound()); } return(View(orderEntity)); }
public IHttpActionResult GetOrderEntity(int id) { OrderEntity orderEntity = db.Find(id); if (orderEntity == null) { return(NotFound()); } return(Ok(orderEntity)); }