Пример #1
0
 public static IQueryable <TEntity> PaginateReadUncommitted <TEntity>(this IOrderedQueryable <TEntity> orderedQueryable, bool isReadUncommitted, Pagination pagination)
 {
     if (pagination != null)
     {
         pagination.TotalCount = orderedQueryable.CountReadUncommitted(isReadUncommitted);
         return(orderedQueryable.Skip(pagination.GetSkip()).Take(pagination.PageSize));
     }
     else
     {
         return(orderedQueryable);
     }
 }