public ActionResult Edit([Bind(Include = "Id,Content,AnswerA,AnswerB,AnswerC,AnswerD,CorrectAnswer")] Question question) { if (ModelState.IsValid) { db.Entry(question).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(question)); }
public ActionResult Edit([Bind(Include = "ID,Quest,Answer1,Answer2,RightAnswer")] Question question) { if (ModelState.IsValid) { db.Entry(question).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(question)); }
public ActionResult Edit([Bind(Include = "ID,Trivia,Answer,Choice1,Choice2,Choice3,Choice4,Choice5")] Question question) { if (ModelState.IsValid) { db.Entry(question).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(question)); }