Wednesday, September 18, 2013

How to implement paging by LINQ

            int numberOfObjectsPerPage = 5001;
            int pageNumber = 1;
            var queryResultPage = acountlist
              .Skip(numberOfObjectsPerPage * pageNumber)
              .Take(numberOfObjectsPerPage).ToList();

No comments:

Post a Comment