We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee8543e commit 08e0875Copy full SHA for 08e0875
PaginationEF/PagedListQueryableExtensions.cs
@@ -9,13 +9,10 @@ public static async Task<PagedList<T>> ToPagedListAsync<T>(this IQueryable<T> so
9
var count = await source.CountAsync(token);
10
if (count > 0)
11
{
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
15
var items = source
16
.Skip((page - 1) * pageSize)
17
.Take(pageSize)
18
- .ToList();
+ .ToListAsync(token);
19
return new PagedList<T>(items, count, page, pageSize);
20
}
21
0 commit comments