public ActionResult Login(LoginModel model) { try { if (_loginService.Login(model.Email, model.Password, model.RememberMe, model.ResetOld)) { return RedirectToAction("Index", "Home"); } } catch (Exception ex) { ModelState.AddModelError("Email", ex.Message); } return View(); }
// // GET: /Account/ public ActionResult Login(string email, string password) { if (string.IsNullOrEmpty(password) || string.IsNullOrEmpty(email)) { return View("SendLogin"); } var model = new LoginModel { Email = email, Password = password, RememberMe = false, ResetOld = false }; return View(model); }