public ActionResult Index(LoginViewModel loginViewModel) { Authentrication a = new Authentrication(); bool flag = a.Authenticate(loginViewModel); if (flag == true) { Session["login"] = 1; return(RedirectToAction("Index", "Student")); } else { return(View(loginViewModel)); } }
public IndexViewModel() { a = new Authentrication(); _user = a.User; }