public async Task <IActionResult> Login(AuthViewModels model) { if (ModelState.IsValid) { bool isUserExist = _repository.CheckLoginPassword(new BLL.Models.BLLUser { Email = model.Email, Password = model.Password }); if (isUserExist) { await Authenticate(model.Email); // аутентификация return(RedirectToAction("Index", "Home")); } ModelState.AddModelError("", "Некорректные логин и(или) пароль"); } return(View(model)); }
public LoginPage() { InitializeComponent(); auth = new UserModels(); _auth = new AuthViewModels(); }