How can I implement the equivalent to a custom IComparer for Linq to Entities OrderBy()?
A custom comparer is not supported in Linq to Entities as MSDN documentation states:
Most of the LINQ ordering methods are supported in LINQ to Entities, with the exception of those that accept an
IComparer
, because the comparer cannot be translated to the data source. For more information, see Standard Query Operators in LINQ to Entities Queries.