Table of Contents

Class OrderByColumn

Namespace
CMS.DataEngine
Assembly
CMS.DataEngine.dll

Order by column

public sealed class OrderByColumn : QueryColumnBase<OrderByColumn>, IQueryParameters<OrderByColumn>, IQueryColumn, IQueryExpression, IQueryParameters, IQueryObjectWithValue, IQueryObject
Inheritance
object
OrderByColumn
Implements
Inherited Members
Extension Methods

Constructors

OrderByColumn()

Initializes a new instance of OrderByColumn.

public OrderByColumn()

OrderByColumn(string, OrderDirection)

Initializes a new instance of OrderByColumn.

public OrderByColumn(string expression, OrderDirection direction = OrderDirection.Ascending)

Parameters

expression string

Expression (column name)

direction OrderDirection

Order direction

Properties

Direction

Order direction

public OrderDirection Direction { get; set; }

Property Value

OrderDirection

IsSingleColumn

Returns true if this column represents a single column

public override bool IsSingleColumn { get; }

Property Value

bool

Methods

Asc(string)

Returns new instance of OrderByColumn for given column name and ascending order.

public static OrderByColumn Asc(string columnName)

Parameters

columnName string

Name of the selected column.

Returns

OrderByColumn

Exceptions

ArgumentException

In case that provided column name is null or empty string.

Desc(string)

Returns new instance of OrderByColumn for given column name and descending order.

public static OrderByColumn Desc(string columnName)

Parameters

columnName string

Name of the selected column.

Returns

OrderByColumn

Exceptions

ArgumentException

In case that provided column name is null or empty string.

GetExpression()

Gets the expression for the column data

public override string GetExpression()

Returns

string