How to write queries to do the followings in SubSonic/C#?
select isNull(col, someDefaultValue) from table
select x = case when (condition) then col1 else col2 end from table
How to write queries to do the followings in SubSonic/C#?
select isNull(col, someDefaultValue) from table
select x = case when (condition) then col1 else col2 end from table
I don't have SubSonic up and running locally, but it looks like it supports the coalesce function, which is what your first query seems to be doing. (Coalesce takes any number of parameters and returns the first non-null one.)
You are probably going to want to use the Inline Query function example at subsonicproject