dsbenghe / Novell.Directory.Ldap.NETStandard

.NET LDAP client library for .NET Standard >= 2.0, .NET Core >=1.0, NET5/NET6/NET7/NET8 - works with any LDAP protocol compatible directory server (including Microsoft Active Directory).
MIT License
558 stars 153 forks source link

Remove dependency on System.Linq.Async #203

Closed jcracknell closed 2 years ago

jcracknell commented 2 years ago

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:

https://github.com/dotnet/reactive/issues/1057 https://github.com/dotnet/efcore/issues/18124

jcracknell commented 2 years ago

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