public TEntity GetById(int Id)
 {
     using (var context = new ClickerContext())
     {
         return(context.Set <TEntity>().Find(Id));
     }
 }
 public List <TEntity> GetAll()
 {
     using (var context = new ClickerContext())
     {
         return(context.Set <TEntity>().ToList());
     }
 }
 public void Delete(TEntity entity)
 {
     using (var context = new ClickerContext())
     {
         context.Set <TEntity>().Remove(entity);
         context.SaveChanges();
     }
 }
 public void Create(TEntity entity)
 {
     using (var context = new ClickerContext())
     {
         context.Set <TEntity>().Add(entity);
         context.SaveChanges();
     }
 }