public ActionResult Login(LoginVM loginVm) { Boolean success = true; success = UserBL.CheckLoginCredentials(loginVm); if (success) { return RedirectToAction("Index", "Home"); } return View(); }
public static Boolean CheckLoginCredentials(LoginVM userVm) { UserMapper userMapper = new UserMapper(); List<Nike_User> parsedList = userMapper.GetAllUsers(); foreach (var item in parsedList) { if ((item.emailAddress == userVm.EmailAddress) && (item.Password == userVm.Password)) { return true; } } return false; }