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

Asynchronous streams missing a namespace? #1778

Closed
christiannagel opened this issue Sep 26, 2019 · 2 comments · Fixed by #1779
Closed

Asynchronous streams missing a namespace? #1778

christiannagel opened this issue Sep 26, 2019 · 2 comments · Fixed by #1779
Assignees
Milestone

Comments

@christiannagel
Copy link

The documentation for the async streams with EF Core 3.0 shows a simple LINQ query to use await foreach. I tried that and it's not working as shown (at least a namespace is missing).

https://github.com/aspnet/EntityFramework.Docs/blob/master/entity-framework/core/what-is-new/ef-core-3.0/index.md#asynchronous-streams

The DbSet implements IAsyncEnumerable, but the IQueryable extension methods don't.
Does a specific namespace need to be opened? I tried it with Microsoft.EntityFrameworkCore, but here other extension methods are not used.
The correct namespace should be documented, or if there is a different way what needs to be done to make it work.

Thanks,
Christian

@christiannagel christiannagel changed the title Async streams Asynchronous streams missing a namespace? Sep 26, 2019
smitpatel added a commit that referenced this issue Sep 26, 2019
smitpatel added a commit that referenced this issue Sep 26, 2019
@smitpatel smitpatel self-assigned this Sep 26, 2019
@smitpatel smitpatel added this to the 3.1.0 milestone Sep 26, 2019
@HSchwichtenberg
Copy link
Contributor

@smitpatel @divega
Thank you for this fix. I suggest that you correct this in the blog post too ;-)

https://devblogs.microsoft.com/dotnet/announcing-ef-core-3-0-and-ef-6-3-general-availability/

var orders =   from o in context.Orders  where o.Status == OrderStatus.Pending  select o; await foreach(var o in orders){  Process(o);}

@divega
Copy link
Contributor

divega commented Sep 27, 2019

@christiannagel, @HSchwichtenberg thank you. The blog post is now also corrected.

FWIW, our LINQ queries cannot be directly consumed directly with await foreach, but there is a chance this can be enabled in the future.

See dotnet/roslyn#32289 (comment).

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

Successfully merging a pull request may close this issue.

4 participants