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