Using Ternary Operator in OrderBy Entity Framework
I’ve seen code similar to the following: collection.OrderBy(x => x.StartDate == null ? 0 : 1).ThenBy(x => x.CreatedDate).To list(); I have Googled and searched this site and I can’t find any explanation for what this does. Normally I order by a field in the collection by property name. Can someone please explain to me what… Read More Using Ternary Operator in OrderBy Entity Framework