DbExpressionBuilder.ThenByDescending 方法

定義

建立一個新的 DbSortExpression ,排序順序包含給定排序輸入組的排序順序,並以遞減排序順序指定排序鍵,並預設排序。

多載

名稱 Description
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 為空值。

-或-

sortKey 產生的表達式為零。

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 為零。

-或-

sortKey 產生的表達式為零。

source 沒有集合結果類型。

-或-

所產生的 sortKey 表達式沒有可排序可比較的字串結果類型。

collation 是空的或僅包含空格字元。

適用於