Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Models.PetOwner petOwner = db.PetOwners.Find(id);
            db.PetOwners.Remove(petOwner);
            db.SaveChanges();

            return(RedirectToAction("Index"));
        }
Example #2
0
        //===============================================================================
        // 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));
        }