AspNetCoreOData
AspNetCoreOData copied to clipboard
Need to support async queries
It's absolutely essential for scalability that this library can support queries which can be done asynchronously.
Right now, the [EnableQuery] Attribute will take a query from Entity Framework Core and do an implicit ToList() on it in the constructor of TruncatedCollection<T>, meaning that its thread will block while the query is running.
I understand the need for library agnosticism but some way of allowing queries to be ran asynchronously, through config or otherwise must be possible, otherwise the scalability of this is in question.
Duplicate of #253 ? Also as I have commented there, why TruncatedCollection<T> exists this way in the first place? Couldn't it be possible to create some kind of wrapper to avoid enumerating all elements in a non-asynchronous way?