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