We have WEB API which uses OData. Our controllers inherit from EntitySetController and now we are changing it to AsyncEntitySetController
Patch, Post, Put, Get(key) methods are easy to change, but the problem is with Get method.
In EntitySetController it returns IQueryable, filters specified in URI are further applied and then query is executed.
But in AsyncEntitySetController it returns IEnumerable so we need to call ToListAsync in method and I am affraid that parameters from URI are not applied or query is called before the filters are applied and filters are applied to memory collection.
How to achieve that it behaves the same way as with EntitySetController, so:
- iqueryable is made
- filters from URI are applied
- query is called in async/await way?