Пример #1
0
        public int SaveUser(Login loginUser)
        {
            var user = this.GetUserbyID(loginUser.LoginID);
            if (user != null)
            {
                user.FirstName = loginUser.FirstName;
                user.LastName = loginUser.LastName;
                user.Password = loginUser.Password;
                user.Email = loginUser.Email;
                user.PhoneNumber = loginUser.PhoneNumber;
                user.Role = loginUser.Role;
                user.SecurityQuestion = loginUser.SecurityQuestion;
                user.Answer = loginUser.Answer;
                context.Entry(user).State = EntityState.Modified;
            }

            return context.SaveChanges();
        }
Пример #2
0
 public ActionResult UserProfile(Login user)
 {
     int i = this.repository.SaveUser(user);
     return RedirectToAction("Dashboard", "Dashboard");
 }