DbExpressionBuilder.Sort Method (DbExpressionBinding, IEnumerable<DbSortClause>)

.NET Framework (current version)
 

Creates a new DbSortExpression that sorts the given input set by the specified sort specifications.

Namespace:   System.Data.Common.CommandTrees.ExpressionBuilder
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

public static DbSortExpression Sort(
	this DbExpressionBinding input,
	IEnumerable<DbSortClause> sortOrder
)

Parameters

input
Type: System.Data.Common.CommandTrees.DbExpressionBinding

An expression binding that specifies the input set.

sortOrder
Type: System.Collections.Generic.IEnumerable<DbSortClause>

A list of sort specifications that determine how the elements of the input set should be sorted.

Return Value

Type: System.Data.Common.CommandTrees.DbSortExpression

A new DbSortExpression that represents the sort operation.

Exception Condition
ArgumentNullException

input or sortOrder is null, or sortOrder contains null.

ArgumentException

sortOrder is empty.

.NET Framework
Available since 4.5
Return to top
Show: