public ActionResult DeleteConfirmed(int id) { ListDisability ListDisability = db.ListDisability.Find(id); db.ListDisability.Remove(ListDisability); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "DisabilityID,Disability")] ListDisability ListDisability) { if (ModelState.IsValid) { db.Entry(ListDisability).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(ListDisability)); }
public ActionResult Create([Bind(Include = "DisabilityID,Disability")] ListDisability ListDisability) { if (ModelState.IsValid) { db.ListDisability.Add(ListDisability); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(ListDisability)); }
// GET: ListDisability/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ListDisability ListDisability = db.ListDisability.Find(id); if (ListDisability == null) { return(HttpNotFound()); } return(View(ListDisability)); }