Beispiel #1
0
 public bool Update(Arac AracNesnesi)
 {
     try
     {
         using (var nesne = new EfAracRepository())
         {
             nesne.Update(AracNesnesi);
             return(true);
         }
     }
     catch (Exception hata)
     {
         Console.WriteLine(hata);
         return(false);
     }
 }
Beispiel #2
0
 public Arac GetById(int id)
 {
     try
     {
         using (var nesne = new EfAracRepository())
         {
             var aracNesne = nesne.GetById(id);
             return((Arac)aracNesne);
         }
     }
     catch (Exception hata)
     {
         Console.WriteLine(hata);
         return(null);
     }
 }
Beispiel #3
0
        public IList <Arac> GetAll()
        {
            try
            {
                using (var nesne = new EfAracRepository())
                {
                    var randomList = nesne.GetAll();
                    return(randomList.ToList());
                }
            }


            catch (Exception hata)
            {
                Console.WriteLine(hata);
                return(null);
            }
        }