Exemplo n.º 1
0
        public List <User> Get(string username, UserLevel level)
        {
            Filter <User> filter = new AndFilter <User>(new StandardUserFilterProvider(username, level));

            var users = filter.ApplyFilter(dbContext.Users);

            return(users.ToList());
        }
        public List <Show> Get(string title, string actors, string description, string genre, string imdbId,
                               DateTime date1, DateTime date2, int imdbRating, bool?available, ShowType showType)
        {
            Filter <Show> filter = new AndFilter <Show>(new StandardShowFilterProvider(
                                                            String.IsNullOrEmpty(imdbId) ? title : imdbId, description, actors,
                                                            genre, date1, date2, imdbRating, available, showType));

            var shows = filter.ApplyFilter(dbContext.Shows).ToList();

            return(shows);
        }