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

 

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

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

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

Parameters

input
Type: System.Data.Entity.Core.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.Entity.Core.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.