public ActionResult RuleUpdate(int Id) { AdoptRule adoptRule = db.AdoptRules.Find(Id); if (adoptRule == null) { return(HttpNotFound()); } return(View(adoptRule)); }
public ActionResult RuleUpdate(AdoptRule adoptRule) { if (ModelState.IsValid) { db.Entry(adoptRule).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("AdoptRule")); } return(View(adoptRule)); }