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