Find LINQ ambiguities introduced by .NET 9 IAsyncEnumerable extensions
Recipe ID
OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net9.FindAsyncEnumerableLinqAmbiguityArtifactOpenRewrite.Recipes.CSharp.Migration.Dotnet.NET 9 added LINQ extension methods on IAsyncEnumerable<T>. Types implementing both IQueryable<T> and IAsyncEnumerable<T> (notably EF Core DbSet<T>) now produce ambiguous Where/Select/FirstOrDefault/etc. calls. Flags such calls for manual disambiguation (typically by inserting .AsQueryable()).
Single recipecsharplinqsearchnet9Proprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net9.FindAsyncEnumerableLinqAmbiguityIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.Dotnet