Implement support for IAsyncEnumerable
Should odata support IAsyncEnumerable? There is an open work item on asp.net core https://github.com/aspnet/AspNetCore/issues/5357 and the underlying c# support https://github.com/dotnet/corefx/issues/32640
@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.
Note that Ix Async will be releasing a preview of the LINQ operators for this shortly.
@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:
https://github.com/OData/WebApi/blob/9e447bd77d177cf4cd1e285c318ffc3185a34c12/src/Microsoft.AspNet.OData.Shared/TypeHelper.cs#L269
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.
What is the best approach to deal with MaxIAsyncEnumerableBufferLimit in odata?
Any plan to add support for IAsyncEnumerable to Odata?
Is there any plan to implement this ?
Any news on this one?
Also interested in this feature
also interested