예제 #1
0
 public ActionResult Edit([Bind(Include = "ID,Name,Title,Race,Class,Description,Level,Player")] PC pC)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pC).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(pC));
 }
예제 #2
0
 public ActionResult Edit([Bind(Include = "ID,Name")] Adventure adventure)
 {
     if (ModelState.IsValid)
     {
         db.Entry(adventure).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(adventure));
 }