public ActionResult Edit(long?Id) { if (Id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var entity = Dao.Detail(Id); if (entity == null) { return(HttpNotFound()); } return(View(entity)); }