Is .Skip().Take() the only way to get paging in Entity Framework? Is there some way to select the row number in the output so I could use Where( p => p.row > 9 && p.row <21)
?
select top 100 ROW_NUMBER() over (order by ID) as row, *
from myTable
I would think the ROW_Number() field must exist in the generated SQL for it to know what rows to skip and take.
Of course, I could get around this by creating separate SQL views with that field, or I could specify the exact SQL to EF, but I really want to use the Linq Expressions.