Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for IAsyncEnumerable #2775

Open
danielpastoor opened this issue Apr 19, 2023 · 4 comments
Open

Implement support for IAsyncEnumerable #2775

danielpastoor opened this issue Apr 19, 2023 · 4 comments

Comments

@danielpastoor
Copy link

Should odata support IAsyncEnumerable? As when we use applyto on the server for example EntityFramework context.

Then we need to remap the data if there has been use of a select query.

Would it then be usefull to use IAsyncEnumerable to map and stream the data to the client at the samen time?

@habbes
Copy link
Contributor

habbes commented Apr 25, 2023

@danielpastoor just to check whether I understand your request:

You want to be able to return an IAsyncEnumerable from a controller action and have support that the same way it does for IEnumerable (i.e. query processing with EnableQuery, OData result serialization, etc.), right?

@danielpastoor
Copy link
Author

Yes that is right

@radderz
Copy link

radderz commented Oct 25, 2023

Ideally it would work the same as returning IQueryable where the select, filter etc applies to the returned results. And if there are no results post OData filtering then send nothing. This would be useful for streaming data changes, where the client decides how they want their data filtered/shaped.

I do think this would only support a subset though, as things like aggregations wouldn't make sense.

@danielpastoor
Copy link
Author

It is already implemented in the asp.net core variant:
OData/AspNetCoreOData@fa81478

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants