private IQueryable <Season> FilterSeasons(IQueryable <Season> query, SeasonFilter filter) { if (filter != null) { query = filter.FilterSeasons(query); } return(query); }
public async Task <IEnumerable <Season> > GetAllWithFilter(SeasonFilter filter) { return(await FilterSeasons(db.Seasons.Include(s => s.SeasonCountry).Include(s => s.RuleSet), filter) .OrderBy(s => s.Name) .ToListAsync()); }