I’ve looked into this a bit, and I’m able to reproduce what you’re describing, or at least something close to it, using EFCore 3.1.8.
The DbSet class implements more than one interface, both IQueryable and IAsyncEnumerable. So when accessing a property of type DbSet directly, it will look for extension methods that extend both of those interfaces to find a matching extension method. In a pure EF Core installation, there are no extensions available for IAsyncEnumerable. However, the System.Linq.Async library, published by the Rx.NET team, adds LINQ extensions to IAsyncEnumerable. This library is included as a dependency of the Couchbase SDK so we can use some of it’s features and offer them to the SDK’s users, though you could get this dependency from many other places.
Once the System.Linq.Async package is included in your project, both interfaces now have an implementation for Where, and C# can’t tell which is the best to choose. In fact, for your use case the IQueryable extension is the right choice, but the C# compiler can’t know that.
The workaround is to use
.AsQueryable() which will typecast the DbSet to IQueryable and remove the ambiguity from the C# compiler. In fact, this is documented on that method in EF Core:
This is a convenience method to help with disambiguation of extension methods in the same namespace that extend both interfaces.
Hopefully this helps!