public TEntity Get(int id) { using (var context = new GymPass()) { return(context.Set <TEntity>().Find(id)); } }
public void Insert(TEntity entity) { using (var context = new GymPass()) { context.Set <TEntity>().Add(entity); context.SaveChanges(); } }