I'm returning search results ordered by price. I've been asked to move everything with a price of zero to the end of the results. I know this should be easy but I seem to be missing how to accomplish this. Any suggestions?
public static ITypeSearch<ICommunitySearch> OrderByLowestPrice(this ITypeSearch<ICommunitySearch> search)
search = search.OrderBy(i => i.LowestPrice());
Yeah it does sound easy but i dont think it is using the Find API!
To make it work - you probably need to modify your LowestPrice() convention to hard set a very high hardcoded price in the Find index for zero priced products. The orderingby Lowest Price woudl then have these at the end of the result. That would meet your requirement although it is not tidy.
Hi Johnny, I came to similar conclusions after posting this. I substituted Double.MaxValue for every zero and things worked as expected.