DbExpressionBuilder.ThenByDescending 方法

定义

创建一个新的 DbSortExpression 排序顺序,其中包含给定顺序输入集的排序顺序以及按降序排序顺序和默认排序规则的指定排序键。

重载

名称 说明
ThenByDescending(DbSortExpression, Func<DbExpression,DbExpression>)

创建一个新的 DbSortExpression 排序顺序,其中包含给定顺序输入集的排序顺序以及按降序排序顺序和默认排序规则的指定排序键。

ThenByDescending(DbSortExpression, Func<DbExpression,DbExpression>, String)

创建一个新的 DbSortExpression 排序顺序,其中包含给定顺序输入集的排序顺序以及按降序排序顺序和指定的排序规则的指定排序键。

ThenByDescending(DbSortExpression, Func<DbExpression,DbExpression>)

创建一个新的 DbSortExpression 排序顺序,其中包含给定顺序输入集的排序顺序以及按降序排序顺序和默认排序规则的指定排序键。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbSortExpression ^ ThenByDescending(System::Data::Common::CommandTrees::DbSortExpression ^ source, Func<System::Data::Common::CommandTrees::DbExpression ^, System::Data::Common::CommandTrees::DbExpression ^> ^ sortKey);
public static System.Data.Common.CommandTrees.DbSortExpression ThenByDescending(this System.Data.Common.CommandTrees.DbSortExpression source, Func<System.Data.Common.CommandTrees.DbExpression,System.Data.Common.CommandTrees.DbExpression> sortKey);
static member ThenByDescending : System.Data.Common.CommandTrees.DbSortExpression * Func<System.Data.Common.CommandTrees.DbExpression, System.Data.Common.CommandTrees.DbExpression> -> System.Data.Common.CommandTrees.DbSortExpression
<Extension()>
Public Function ThenByDescending (source As DbSortExpression, sortKey As Func(Of DbExpression, DbExpression)) As DbSortExpression

参数

source
DbSortExpression

一个指定有序输入集的 DbSortExpression。

sortKey
Func<DbExpression,DbExpression>

一个方法,指定如何在给定输入集的成员的情况下派生其他排序键表达式。 此方法必须生成具有提供排序键定义的顺序可比较结果类型的表达式。

返回

一个新的 DbSortExpression,表示新的整体排序依据操作。

例外

sourcesortKey 为 null。

-或-

生成的 sortKey 表达式为 null。

source 没有集合结果类型。

-或-

由其 sortKey 生成的表达式没有可比较顺序的结果类型。

适用于

ThenByDescending(DbSortExpression, Func<DbExpression,DbExpression>, String)

创建一个新的 DbSortExpression 排序顺序,其中包含给定顺序输入集的排序顺序以及按降序排序顺序和指定的排序规则的指定排序键。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbSortExpression ^ ThenByDescending(System::Data::Common::CommandTrees::DbSortExpression ^ source, Func<System::Data::Common::CommandTrees::DbExpression ^, System::Data::Common::CommandTrees::DbExpression ^> ^ sortKey, System::String ^ collation);
public static System.Data.Common.CommandTrees.DbSortExpression ThenByDescending(this System.Data.Common.CommandTrees.DbSortExpression source, Func<System.Data.Common.CommandTrees.DbExpression,System.Data.Common.CommandTrees.DbExpression> sortKey, string collation);
static member ThenByDescending : System.Data.Common.CommandTrees.DbSortExpression * Func<System.Data.Common.CommandTrees.DbExpression, System.Data.Common.CommandTrees.DbExpression> * string -> System.Data.Common.CommandTrees.DbSortExpression
<Extension()>
Public Function ThenByDescending (source As DbSortExpression, sortKey As Func(Of DbExpression, DbExpression), collation As String) As DbSortExpression

参数

source
DbSortExpression

一个指定有序输入集的 DbSortExpression。

sortKey
Func<DbExpression,DbExpression>

一个方法,指定如何在给定输入集的成员的情况下派生其他排序键表达式。 此方法必须生成具有提供排序键定义的顺序可比较结果类型的表达式。

collation
String

要排序的排序规则。

返回

一个新的 DbSortExpression,表示新的整体排序依据操作。

例外

source sortKeycollation为 null。

-或-

生成的 sortKey 表达式为 null。

source 没有集合结果类型。

-或-

由其 sortKey 生成的表达式没有可比较顺序的字符串结果类型。

collation 为空或仅包含空格字符。

适用于