DbExpressionBuilder.Sort(DbExpressionBinding, IEnumerable<DbSortClause>) 方法
定义
创建一个新的 DbSortExpression,它按照指定的排序规范对给定的输入集进行排序。Creates a new DbSortExpression that sorts the given input set by the specified sort specifications.
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbSortExpression ^ Sort(System::Data::Common::CommandTrees::DbExpressionBinding ^ input, System::Collections::Generic::IEnumerable<System::Data::Common::CommandTrees::DbSortClause ^> ^ sortOrder);
public static System.Data.Common.CommandTrees.DbSortExpression Sort (this System.Data.Common.CommandTrees.DbExpressionBinding input, System.Collections.Generic.IEnumerable<System.Data.Common.CommandTrees.DbSortClause> sortOrder);
static member Sort : System.Data.Common.CommandTrees.DbExpressionBinding * seq<System.Data.Common.CommandTrees.DbSortClause> -> System.Data.Common.CommandTrees.DbSortExpression
<Extension()>
Public Function Sort (input As DbExpressionBinding, sortOrder As IEnumerable(Of DbSortClause)) As DbSortExpression
参数
- input
- DbExpressionBinding
一个指定输入集的表达式绑定。An expression binding that specifies the input set.
- sortOrder
- IEnumerable<DbSortClause>
确定应如何对输入集元素排序的排序规范列表。A list of sort specifications that determine how the elements of the input set should be sorted.
返回
表示排序操作的新 DbSortExpression。A new DbSortExpression that represents the sort operation.
例外
input 或 sortOrder 为 null,或者 sortOrder 包含 null。input or sortOrder is null, or sortOrder contains null.
sortOrder 为空。sortOrder is empty.