IQueryable and decoupling..

Jan 20, 2016 at 10:03 PM
I see that you are returning IQueryable from your repos doesn't it defeat the purpose of DDD decoupling of core from being dependent on data access or Infrastructure ? . can't be tested in a decoupled way right?
Jan 21, 2016 at 5:44 PM
IQueryable is needed for the grid, also it is used in some service classes,
you could move the querying logic from the Service to Data, but you will still need it for the grid (in the WebUI)
the grid generates the query (sorting, paging) and fetches data only for the page that it is displaying

you could take GridParams and send them to the Data Layer, generate the query yourself and give the grid the ready sorted/paged data, but I think that would be overkill