Пример #1
0
        public IEnumerable <Campus> GetAllPaging(out int totalRow, int page = 1, int pageSize = 10, string[] includes = null)
        {
            var predicate = PredicateBuilder.True <Campus>();

            var query = _campusRepository.GetByConditions(predicate, includes);

            totalRow = query.Count();

            return(query.OrderBy(x => x.CreatedAt).Skip((page - 1) * pageSize).Take(pageSize));
        }