Exemple #1
0
 public IList <Kullanicilar> GetAll()
 {
     try
     {
         using (var kullanici = new EfKullaniciRepository())
         {
             var temp = kullanici.GetAll();
             return(temp.ToList());
         }
     }
     catch (Exception hata)
     {
         Console.WriteLine(hata);
         return(null);
     }
 }
Exemple #2
0
 public bool Login(Kullanicilar user)
 {
     try
     {
         using (var kullanici = new EfKullaniciRepository())
         {
             if (kullanici.GetAll().Where(kn => kn.Adi == user.Adi && kn.Sifre == user.Sifre).Count() == 1)
             {
                 return(true);
             }
             else
             {
                 return(false);
             }
         }
     }
     catch (Exception hata)
     {
         Console.WriteLine(hata);
         return(false);
     }
 }
 public KullaniciManager()
 {
     efKullaniciRepository = new EfKullaniciRepository();
 }