Skip to content

Implement support for IAsyncEnumerable #2775

Open

Description

@danielpastoor

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?

Activity

  1. habbes commented on Apr 25, 2023

    @habbes
    Contributor

    @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?

  2. danielpastoor commented on Apr 30, 2023

    @danielpastoor
    Author

    Yes that is right

  3. radderz commented on Oct 25, 2023

    @radderz

    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.

  4. danielpastoor commented on Nov 2, 2023

    @danielpastoor
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions