Use LINQ Order() and OrderDescending()
ProprietaryReplace collection.OrderBy(x => x) with collection.Order() and collection.OrderByDescending(x => x) with collection.OrderDescending(). Available since .NET 7.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net7. UseLinqOrdermod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net7. UseLinqOrderInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.