Use ThenBy instead of second OrderBy
ProprietaryReplace items.OrderBy(a).OrderBy(b) with items.OrderBy(a).ThenBy(b). A second OrderBy discards the first sort; ThenBy preserves it as a secondary key.
OpenRewrite. Recipes. CSharp. CodeQuality. Linq. UseOrderByThenBymod run . --recipe= OpenRewrite. Recipes. CSharp. CodeQuality. Linq. UseOrderByThenByInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.