public ActionResult Create(Answer answer) { if (ModelState.IsValid) { db.Answers.Add(answer); db.SaveChanges(); return RedirectToAction("Index"); } return View(answer); }
public ActionResult Edit(Answer answer) { if (ModelState.IsValid) { db.Entry(answer).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(answer); }
public override void RemoveAnswer(Answer answer) { throw new NotImplementedException(); }