Example LINQ query:
Code: Select all
context.Entities
.OrderBy(x => x.SomeString != null)
.ThenBy(x => x.SomeString)
.ToList()
Code: Select all
SELECT "v".SOME_STRING
FROM ENTITY "v"
ORDER BY "v".SOME_STRING IS NOT NULL, "v".SOME_STRING
Code: Select all
SELECT "v".SOME_STRING
FROM ENTITY "v"
ORDER BY CASE WHEN "v".SOME_STRING IS NOT NULL THEN 1 ELSE 0 END, "v".SOME_STRING
I think the context I have provided should be enough but let me know if you need any additional details.