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));
 }
Example #2
0
 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));
 }
Example #3
0
 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));
 }