Example #1
0
        private IQueryable <Season> FilterSeasons(IQueryable <Season> query, SeasonFilter filter)
        {
            if (filter != null)
            {
                query = filter.FilterSeasons(query);
            }

            return(query);
        }
Example #2
0
 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());
 }