How would you implement pagination when the input data needs to be grouped first? I understand how to implement pagination from the link below:
, but I would like to be able to do this where each item in the paginated list is a group (that can be expanded) from the input data. Something similar to the code below - to prevent retrieving all rows of the table into memory, ordersList is IQueryable
. The IQueryable
returned is what I would like to pass into the pagination function.
from order in ordersList
group order by order.FullName into customers
select customers
However, a query like this runs on the client (and actually throws an exception in Entity Framework Core 3.0+). Is there a way to only retrieve the items on the current page for this situation?