public void EditUser(Users user) { var originalUser = (from u in _dataModel.Users1 where u.userId == user.userId select u).First(); _dataModel.ApplyCurrentValues(originalUser.EntityKey.EntitySetName, user); _dataModel.SaveChanges(); }
public ActionResult Edit(Users user) { try { if (ModelState.IsValid) { _userService.EditUser(user); } return RedirectToAction("Index"); } catch { return View(); } }
public string CreateUserData(Users user) { return user.userId.ToString(); }
public void CreateUser(Users user) { user.userId = Guid.NewGuid(); _dataModel.AddToUsers1(user); _dataModel.SaveChanges(); }
public ActionResult LogOn(Users user) { Users authUser = _userService.AuthenticateUser(user.username, user.password); if (authUser != null) { return Redirect("~/Admin"); } return View(); }
/// <summary> /// Deprecated Method for adding a new object to the Users1 EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToUsers1(Users users) { base.AddObject("Users1", users); }
/// <summary> /// Create a new Users object. /// </summary> /// <param name="userId">Initial value of the userId property.</param> public static Users CreateUsers(global::System.Guid userId) { Users users = new Users(); users.userId = userId; return users; }