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