Here's the problem:
The database is heavily standardized, and one particular query is based on multiple relationships in the database. The query is designed to combine all tables, build the entire object and then return a list of these objects.
In other words, this particular query does a great job.
Now the query returns only the number of X elements, since it supports pagination, but we also need to know the total number of elements that are there.
Currently, these two tasks are independent, but very similar requests in our domain service. Ideally, I would like to combine these two requests so that the server is called once, not twice, and that connections only happen once.
The output / link options do not work, and since the function is designed to return an IQueryable object, I focused on how to return this list of elements, as well as the total number.
I'm sure someone has come across this before - any thoughts?
source
share