public virtual IEnumerable<T> GetAll() { return _dbSet; } public virtual IEnumerable<T> GetAll(params string[] includes) { var query = _dbSet.AsQueryable(); includes.ToList().ForEach(x => query = query.Include(x)); return query; }And I have a repository class for my table which has just the following code:
public class ItemTreeRepository : RepositoryBase<ItemTree>, IItemTreeRepository { public ItemTreeRepository(ISysManagerContext context) : base(context) { } }I need to add the following restriction to the returned dataset for GetAll methods (parent_id = 0) (e.g. I only want to return parent nodes).