public Repository(PessoaContext context) { Db = context; DbSet = Db.Set <TEntity>(); }
public TEntity Adicionar(TEntity entity) { _dbContext.Set <TEntity>().Add(entity); _dbContext.SaveChanges(); return(entity); }