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
-
objectOrderByColumn
- 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
stringExpression (column name)
direction
OrderDirectionOrder direction
Properties
Direction
Order direction
public OrderDirection Direction { get; set; }
Property Value
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
stringName of the selected column.
Returns
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
stringName of the selected column.
Returns
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