public Repository(ControleContext context) { DatabaseContext = context; DbSet = DatabaseContext.Set <TEntity>(); }
public void Adicionar(TEntity entity) { _db.Set <TEntity>().Add(entity); _db.SaveChanges(); }