public ActionResult Edit([Bind(Include = "CategoryId,CategoryTitle,UserId")] Category category)
 {
     if (ModelState.IsValid)
     {
         db.Entry(category).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(category));
 }
示例#2
0
 public ActionResult Edit([Bind(Include = "Id,Email,Password")] AppUser appUser)
 {
     if (ModelState.IsValid)
     {
         db.Entry(appUser).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(appUser));
 }
示例#3
0
 public void UpdateTask(UserTask userTask)
 {
     db.Entry(userTask).State = EntityState.Modified;
     db.SaveChanges();
 }
示例#4
0
 public void UpdateCategory(Category category)
 {
     db.Entry(category).State = EntityState.Modified;
     db.SaveChanges();
 }