public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Person person = repo.Get((int)id); if (person == null) { return(HttpNotFound()); } return(View(person)); }
// GET: PeopleRepo/Details/5 public IActionResult Details(int id) { Person person = _personRepo.Get(id); return View(person); }