public ActionResult DeleteConfirmed(int id) { Models.PetOwner petOwner = db.PetOwners.Find(id); db.PetOwners.Remove(petOwner); db.SaveChanges(); return(RedirectToAction("Index")); }
//=============================================================================== // GET: PetOwners/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Models.PetOwner petOwner = db.PetOwners.Find(id); if (petOwner == null) { return(HttpNotFound()); } return(View(petOwner)); }