DbExpressionBuilder.ThenBy 方法

定义

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

重载

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

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

ThenBy(DbSortExpression, Func<DbExpression,DbExpression>)

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

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

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

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbSortExpression ^ ThenBy(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 ThenBy (this System.Data.Common.CommandTrees.DbSortExpression source, Func<System.Data.Common.CommandTrees.DbExpression,System.Data.Common.CommandTrees.DbExpression> sortKey, string collation);
static member ThenBy : 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 ThenBy (source As DbSortExpression, sortKey As Func(Of DbExpression, DbExpression), collation As String) As DbSortExpression

参数

source
DbSortExpression

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

sortKey
Func<DbExpression,DbExpression>

一个方法,该方法指定如何在给定输入集成员时,派生附加的排序键表达式。 此方法必须生成一个可比较顺序的结果类型的表达式,提供排序键定义。

collation
String

排序所依据的排序规则。

返回

表示整个按顺序的新操作的新 DbSortExpression。

例外

sourcesortKeycollation 为 null。

- 或 -

sortKey 生成的表达式为 null。

source 没有集合结果类型。

- 或 -

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

collation 为空,或者只包含空白字符。

适用于

ThenBy(DbSortExpression, Func<DbExpression,DbExpression>)

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

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbSortExpression ^ ThenBy(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 ThenBy (this System.Data.Common.CommandTrees.DbSortExpression source, Func<System.Data.Common.CommandTrees.DbExpression,System.Data.Common.CommandTrees.DbExpression> sortKey);
static member ThenBy : System.Data.Common.CommandTrees.DbSortExpression * Func<System.Data.Common.CommandTrees.DbExpression, System.Data.Common.CommandTrees.DbExpression> -> System.Data.Common.CommandTrees.DbSortExpression
<Extension()>
Public Function ThenBy (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 没有可比较顺序的结果类型。

适用于