public ActionResult Login(string email, string password) { // LINQ gazeteContainer gazete = new gazeteContainer(); User user = gazete.UserSet.FirstOrDefault(r => r.Mail == email && r.Password == password); if (user != null) { Session["user"] = user; return(RedirectToAction("Index")); } TempData["error"] = "Hatalı kullanıcı adı veya parola !"; return(View()); }