예제 #1
0
 public Tablo GetirIdile(int id)
 {
     using var context = new CoreAppContext();
     return(context.Set <Tablo>().Find(id));
 }
예제 #2
0
 public List <Tablo> GetirListe()
 {
     using var context = new CoreAppContext();
     return(context.Set <Tablo>().ToList());
 }
예제 #3
0
 public void Sil(Tablo tablo)
 {
     using var context = new CoreAppContext();
     context.Set <Tablo>().Remove(tablo);
     context.SaveChanges();
 }
예제 #4
0
 public void Guncelle(Tablo tablo)
 {
     using var context = new CoreAppContext();
     context.Set <Tablo>().Update(tablo);
     context.SaveChanges();
 }
예제 #5
0
 public void Ekle(Tablo tablo)
 {
     using var context = new CoreAppContext();
     context.Set <Tablo>().Add(tablo);
     context.SaveChanges();
 }
예제 #6
0
 public EntityRepository(CoreAppContext context)
 {
     dbContext = context;
     _dbset    = dbContext.Set <T>();
 }