예제 #1
0
 public ActionResult Edit([Bind(Include = "ID,CName,CDifficulty")] Chore chore)
 {
     if (ModelState.IsValid)
     {
         db.Entry(chore).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(chore));
 }
예제 #2
0
 public ActionResult Edit([Bind(Include = "ID,FirstName,LastName")] Roommate roommate)
 {
     if (ModelState.IsValid)
     {
         db.Entry(roommate).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(roommate));
 }