AspNetCoreOData icon indicating copy to clipboard operation
AspNetCoreOData copied to clipboard

Need to support async queries

Open mbrankintrintech opened this issue 2 years ago • 1 comments

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.

mbrankintrintech avatar Dec 16 '22 02:12 mbrankintrintech

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?

Xriuk avatar Nov 12 '24 13:11 Xriuk