Click or drag to resize
SqlHelperMergeColumns Method (IEnumerableString, IEnumerableString, FuncString, String, Boolean, FuncString, String)
Merges the sets of columns and makes sure that each column in the result is present only once.

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 11.0.0
Syntax
C#
public static string MergeColumns(
	IEnumerable<string> columns,
	IEnumerable<string> addColumns = null,
	Func<string, string> uniqueKey = null,
	bool extraColumns = true,
	Func<string, string> transformation = null
)

Parameters

columns
Type: System.Collections.GenericIEnumerableString
Original column list
addColumns (Optional)
Type: System.Collections.GenericIEnumerableString
List of columns to add
uniqueKey (Optional)
Type: SystemFuncString, String
Function which provides unique key for the merging process (if two column keys match, the merging process allows only first column)
extraColumns (Optional)
Type: SystemBoolean
Indicates if columns which are not part of '*' expression are merged to the existing list of columns
transformation (Optional)
Type: SystemFuncString, String
Column transformation

Return Value

Type: String
Returns the list separated by dashes for use in SQL query
See Also