Пример #1
0
 public ActionResult Login(Kullanici model)
 {
     using (KullaniciRepository repo = new KullaniciRepository())
     {
         Kullanici user = repo.CheckUser(model);
         if (user != null)
         {
             Session["loginSU"] = user;
             return(RedirectToAction("Index"));
         }
         TempData["Message"] = new TempDataDictionary {
             { "class", "alert alert-danger" }, { "msg", "Hatalı kullanıcı Adı/Şifre" }
         };
         return(RedirectToAction("Login"));
     }
 }