public ActionResult Entry(Entry Model) { if (ModelState.IsValid) { if (!Identity.Authentication(Model.Login, cryptMD5.GetHash(Model.Password))) { ModelState.AddModelError("Password", "Пароль не верный"); } } return(Redirect("/Account/Entry")); }
public ActionResult Entry(UserDTO Model) { if (Identity.Authentication(Model.Login, Model.Password)) { return(Redirect("/Home")); } else { ModelState.AddModelError("Password", "Пароль не верный"); } return(Redirect("/Account/Account")); }