Пример #1
0
 public ActionResult Login(LoginUserViewModel user)
 {
     if (!ModelState.IsValid)
     return View("Index", user);
       if (!_chatRepository.IsCredentialsValid(user.Email, user.Password))
       {
     ModelState.AddModelError(string.Empty, "email/password pair is not valid");
     return View("Index", user);
       }
       AuthorizeUser(user.Email, user.RememberMe);
       return RedirectToAction("Index", "Chat");
 }
Пример #2
0
 public ActionResult Index(LoginUserViewModel user)
 {
     return View(user);
 }