public ActionResult Login(User user) { try { MetaniContext context = new MetaniContext(); User userDb = context.Login(user); if (userDb != null) { Session["Login"] = true; Session["Username"] = userDb.Username; return(RedirectToAction("Index", "Admin")); } return(View()); } catch { return(View()); } }