When
Adds a WHEN clause that compares against an expression condition.
Return
This ValueCaseWhen instance for method chaining
Parameters
The expression to compare the case value against
The expression to return if the condition matches
Adds a WHEN clause that compares against a literal condition.
Return
This ValueCaseWhen instance for method chaining
Parameters
The literal value to compare the case value against
The expression to return if the condition matches
Adds a WHEN clause that compares against an expression condition with a literal result.
If the result isn't an Expression, it should be automatically converted to one behind the scenes. This requires providing an IColumnType
for that value. That is needed only once at the start of the chain - after that, the column type value gets saved and reused for subsequent results.
Return
This ValueCaseWhen instance for method chaining
Parameters
The expression to compare the case value against
The literal value to return if the condition matches
Optional column type for the result value
Adds a WHEN clause that compares against a literal condition with a literal result.
Return
This ValueCaseWhen instance for method chaining
Parameters
The literal value to compare the case value against
The literal value to return if the condition matches
Optional column type for the result value