public virtual void Sil(T entity) { using (HastaneRandevuContext context = new HastaneRandevuContext()) { context.Set <T>().Attach(entity); context.Set <T>().Remove(entity); context.SaveChanges(); } }
public List <T> Listele() { using (HastaneRandevuContext context = new HastaneRandevuContext()) { return(context.Set <T>().ToList()); } }
public virtual void Ekle(T entity) { using (HastaneRandevuContext context = new HastaneRandevuContext()) { context.Set <T>().Add(entity); context.SaveChanges(); } }