public ActionResult Edit(UserProfile userprofile)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userprofile).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(userprofile);
 }
示例#2
0
 public static void UpdateUser(UserProfile user)
 {
     db.Entry(user).State = EntityState.Modified;
     db.SaveChanges();
 }
示例#3
0
 public static void AddUser(UserProfile user)
 {
     db.UserProfiles.Add(user);
     db.SaveChanges();
 }