public Kullanici KullaniciGiris(GirisView data)
        {
            Kullanici kul = kRep.Find(x => x.KullaniciAdi == data.KullaniciAdi || x.Sifre == data.Sifre);

            if (kul != null)
            {
                return(kul);
            }
            else
            {
                throw new Exception("Kullanici adı veya şifre uyuşmuyor.");
            }
        }
Esempio n. 2
0
        public ActionResult Giris(GirisView model)
        {
            if (ModelState.IsValid)
            {
                KullaniciRep      kRep = new KullaniciRep();
                Kullanici         kul  = kRep.Find(x => x.KullaniciAdi == model.KullaniciAdi);
                KullaniciYonetimi kYon = new KullaniciYonetimi();
                kYon.KullaniciGiris(model);
                Session["kullanici"] = kul;

                return(RedirectToAction("Index"));
            }
            return(View(model));
        }