Beispiel #1
0
        public IQueryResult <LearningPath> GetAllPaginated(string filter, RequestAllOptionsDTO optionsDTO)
        {
            var result = _collection.AsQueryable();

            if (!string.IsNullOrEmpty(filter))
            {
                result = result.Where(x => x.Name.ToLower().Contains(filter.ToLower()));
            }

            return(AutoMapperQueryble.Paginate(result, optionsDTO));
        }
Beispiel #2
0
        public IQueryResult <UserDTO> GetAllUsers(string filter, RequestAllOptionsDTO options)
        {
            var result = _collection.AsQueryable();

            if (!string.IsNullOrEmpty(filter))
            {
                result = result.Where(x => x.Name.ToLower().Contains(filter.ToLower()));
            }


            var mapped = _mapper.Map <IEnumerable <UserDTO> >(result);

            return(AutoMapperQueryble.Paginate(mapped, options));
        }