Пример #1
0
        public PagedList<User> GetUserList(Pager pager)
        {            
            var baseQuery = from user in Context().Users
                            orderby user.Name
                            select user;

            var dataQuery = baseQuery.Skip(pager.FirstRecord).Take(pager.RecordsPerPage);
            return new PagedList<User>(pager, dataQuery.ToArray(), baseQuery.Count());
        }