I've looked everywhere for documentation or others that have done this but I can't find anything. There is Expression.IsNull(fieldName) which does the equivalent of a normal SQL ISNULL(fieldName) but what I need is ISNULL(fieldName, useThisValueIfNull). Expression.IsNull only allows for one argument.
For example, say I want to order a list by date in descending order, but have null dates to be ordered as if they were put in today:
SQL:
Code:
SELECT * FROM myExample ORDER BY ISNULL(myDate, getdate()) DESC
How can I do this with Criteria Queries?