Beispiel #1
0
        public bool KullaniciSil(int kullaniciID)
        {
            Kullanici kullanici = _kullaniciDAL.KullaniciGetir(kullaniciID);

            if (kullanici != null)
            {
                return(_kullaniciDAL.Delete(kullaniciID));
            }
            else
            {
                throw new Exception("Bu ID'li bir kullanıcı bulunmamaktadır.");
            }
        }
        public Kullanici Giris(LoginDTO giris)
        {
            List <Kullanici> kullanicilar = KullaniciDAL.KullaniciGetir();

            foreach (Kullanici item in kullanicilar)
            {
                if (item.Mail == giris.Mail)
                {
                    if (item.Sifre == giris.Sifre)
                    {
                        return(item);
                    }
                    else
                    {
                        throw new Exception("Şifre hatalı");
                    }
                }
            }
            throw new Exception("Mail hatalı");
        }
        public IActionResult KullaniciGuncelle(string id)
        {
            Kullanici guncellenecekKayit = KullaniciDB.KullaniciGetir(id);

            return(View(guncellenecekKayit));
        }