public ActionResult Create(User newUser)
 {
     if (ModelState.IsValid)
     {
         newUser.Passcode = PasscodeSecurity.encPasscode(newUser.Passcode);
         db.UserList.Add(newUser);
         db.SaveChanges();
         ModelState.AddModelError("", @Lab07.Languages.Lg.AddUserSuccess);
     }
     return(View());
 }
 public ActionResult Create(User newUser)
 {
     if (ModelState.IsValid)
     {
         newUser.Passcode        = PasscodeSecurity.encPasscode(newUser.Passcode);
         db.Entry(newUser).State = EntityState.Added;
         db.SaveChanges();
         ModelState.AddModelError("", "Add user completed!");
         TempData["Msg"] = "Add user completed!";
     }
     return(View());
 }