Recent .NET versions introduced a bunch of new methods on Queryable, which are not currently recognized by DO
.NET 6:
MaxBy
MinBy
.NET 7
Order
OrderDescending
etc.
It'd be great if we could take advantage of these new APIs or at least use the old implementation as a fallback for them.
MaxBy(x => x.Prop) can be often replaced with OrderByDecsending(x => x.Prop).FirstOrDefault()
MinBy(x => x.Prop) <-> OrderBy(x => x.Prop).FirstOrDefault()
Order() <-> OrderBy(x => x)
OrderDescending() <-> OrderByDescending(x => x)