public ActionResult Create(answers answers) { if (ModelState.IsValid) { db.answers.Add(answers); db.SaveChanges(); return RedirectToAction("Index"); } return View(answers); }
public ActionResult Edit(answers answers) { if (ModelState.IsValid) { db.Entry(answers).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(answers); }