public async Task TestToPagedQueryResultsExtension() { var list = new TestDbSet <PagedQueryResultsTestClass>(); for (var i = 0; i < 10; i++) { list.Add(new PagedQueryResultsTestClass { Id = i }); } var start = 0; var limit = 1; Action <PagedQueryResults <PagedQueryResultsTestClass> > tester = (results) => { Assert.AreEqual(list.Count(), results.Total); Assert.AreEqual(limit, results.Results.Count); }; var queryable = list.AsQueryable(); var pagedResults = queryable.ToPagedQueryResults(start, limit); var pagedResultsAsync = await queryable.ToPagedQueryResultsAsync(start, limit); }