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

Remove dependency on System.Linq.Async #203

Merged
merged 1 commit into from
Mar 11, 2022

Conversation

jcracknell
Copy link
Contributor

System.Linq.Async appears to be used exclusively to provide ToListAsync, which is ridiculous as it is trivial to implement.

It also introduces extension methods into the System.Linq namespace which conflict with common EntityFrameworkCore usage patterns, as DbSet<T> implements both IAsyncEnumerable<T> and IQueryable<T>. This most often manifests itself as a conflict between:

System.Linq.AsyncEnumerable.Where<T>(this IAsyncEnumerable<T>, Func<T, bool>)

and

System.Linq.Queryable.Where(this IQueryable<T>, Expression<Func<T, bool>>)

You can watch both Microsoft teams blame each other here:

dotnet/reactive#1057
dotnet/efcore#18124

@jcracknell
Copy link
Contributor Author

Hold up, I didn't namespace the extension. I'll push an update.

Added ToListAsync implementation to eliminate dependency on
System.Linq.Async, which provided System.Linq.AsyncEnumerable.ToListAsync.

System.Linq.Async introduces extension methods to a default (or even
mandatory) namespace which conflict with other implementations, see:
dotnet/reactive#1057
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants