Exemple #1
0
 public void Sil(T entity)
 {
     using var context = new UygulamaContext();
     context.Set <T>().Remove(entity);
     context.SaveChanges();
 }
Exemple #2
0
 public T IdileGetir(int id)
 {
     using var context = new UygulamaContext();
     return(context.Set <T>().Find(id));
 }
Exemple #3
0
 public void Guncelle(T entity)
 {
     using var context = new UygulamaContext();
     context.Set <T>().Update(entity);
     context.SaveChanges();
 }
Exemple #4
0
 public List <T> HepsiniGetir()
 {
     using var context = new UygulamaContext();
     return(context.Set <T>().ToList());
 }
Exemple #5
0
 public void Ekle(T entity)
 {
     using var context = new UygulamaContext();
     context.Set <T>().Add(entity);
     context.SaveChanges();
 }