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 #1755

Open
rossbuggins opened this issue Jan 29, 2019 · 9 comments
Open

Implement support for IAsyncEnumerable #1755

rossbuggins opened this issue Jan 29, 2019 · 9 comments
Labels

Comments

@rossbuggins
Copy link

Should odata support IAsyncEnumerable? There is an open work item on asp.net core dotnet/aspnetcore#5357 and the underlying c# support https://github.com/dotnet/corefx/issues/32640

@KanishManuja-MS
Copy link
Contributor

KanishManuja-MS commented Feb 6, 2019

@rossbuggins Are you referring to APIs at the ODL level or the WebAPI level. Can you please add more details? For the time being, we are assuming this is for WebAPI.

@KanishManuja-MS KanishManuja-MS transferred this issue from OData/odata.net Feb 6, 2019
@clairernovotny
Copy link

Note that Ix Async will be releasing a preview of the LINQ operators for this shortly.

@casperOne
Copy link

@KanishManuja-MS I can't speak for @rossbuggins but now that IAsyncEnumerable is out in the wild, I think the best ask would be to support allowing controllers to return an IAsyncEnumerable<T> implementation (or Task<IAsyncEnumerable<T>>).

This would probably require a change in the TypeHelper class here:

&& t.GetGenericTypeDefinition() == typeof(IEnumerable<>));

To allow the IsCollection method to recognize IAsyncEnumerable<T>.

Additional work would have to be done in the outputformatters/serializers to support async/Task changes when iterating over said IAsyncEnumerable<T>.

The current implementation iterates over the non-generic IEnumerable; a conditional branch there would probably have to be checked to see if there is something assignable to IAsyncEnumerable<object> or IEnumerable and then iterate appropriately.

@aladdinhussein
Copy link

What is the best approach to deal with MaxIAsyncEnumerableBufferLimit in odata?

xuzhg added a commit that referenced this issue Apr 29, 2020
xuzhg added a commit that referenced this issue Sep 14, 2020
xuzhg added a commit that referenced this issue Sep 15, 2020
* Remove the null check, fix issue #1755

* Use the Data source provider to remove the null check for the EF5 and EF6
@madansr7 madansr7 removed their assignment Oct 11, 2021
@darraghjones
Copy link

Any plan to add support for IAsyncEnumerable to Odata?

@medboz
Copy link

medboz commented Nov 15, 2022

Is there any plan to implement this ?

@LucasVos
Copy link

Any news on this one?

@jwevans
Copy link

jwevans commented Jul 10, 2023

Also interested in this feature

@dominicnguyenwt
Copy link

also interested

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

No branches or pull requests