It is best to think of IQueryable<T> as the only query waiting to be launched. Therefore, if you return 2 IQueryable<T> instances and run them in the controller, this will not be different from how they will be executed separately in their own maintenance methods. Each time you execute an IQuerable<T> to get the results, it runs the query on its own, regardless of other IQuerable<T> objects.
The only time (as far as I know) this will affect if there is enough time between two service calls that can close the database connection, but you need a considerable amount of time between service calls for this to be so.
Returning the IQuerable<T> to the controller still has some usefulness, for example, simplifies the processing of paging and sorting (therefore, sorting is performed on the controller and is not performed at the service level, which does not necessarily concern data sorting or paged). However, this does not concern performance, and people will not agree if this is best done in the controller or not (I saw that reputable developers do this and give well-thought-out reasons).
Kalldrexx
source share