Click or drag to resize
SqlHelperGetCase Method
Returns statement for the CASE expressions.

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 9.0.0
Syntax
C#
public static string GetCase(
	IEnumerable<KeyValuePair<string, string>> cases,
	string elseCase = null,
	bool escapeString = true
)

Parameters

cases
Type: System.Collections.GenericIEnumerableKeyValuePairString, String
IEnumerable with KeyValuePair where key is a boolean expression (where condition) and value is result expression
elseCase (Optional)
Type: SystemString
Expression for the else case
escapeString (Optional)
Type: SystemBoolean
Determines whether escape cases' values or not

Return Value

Type: String
See Also