Skip to content

Commit 08e0875

Browse files
committed
Remove comment and added Async overload
1 parent ee8543e commit 08e0875

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

PaginationEF/PagedListQueryableExtensions.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ public static async Task<PagedList<T>> ToPagedListAsync<T>(this IQueryable<T> so
99
var count = await source.CountAsync(token);
1010
if (count > 0)
1111
{
12-
// Be careful when you have NVARCHAR(MAX) in
13-
// combination with ToListAsync
14-
// See here: https://stackoverflow.com/questions/28543293/entity-framework-async-operation-takes-ten-times-as-long-to-complete/28619983
1512
var items = source
1613
.Skip((page - 1) * pageSize)
1714
.Take(pageSize)
18-
.ToList();
15+
.ToListAsync(token);
1916
return new PagedList<T>(items, count, page, pageSize);
2017
}
2118

0 commit comments

Comments
 (0)