示例#1
0
 public ActionResult Edit(Question question)
 {
     if (ModelState.IsValid)
     {
         db.Entry(question).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(question));
 }
示例#2
0
 public ActionResult Edit(TestModel testmodel)
 {
     if (ModelState.IsValid)
     {
         db.Entry(testmodel).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(testmodel));
 }
示例#3
0
 public ActionResult Edit(AnswerVariant answervariant)
 {
     if (ModelState.IsValid)
     {
         db.Entry(answervariant).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(answervariant));
 }