DbExpressionBuilder.OrderByDescending 方法

定義

建立新的 DbSortExpression,它會依據指定的排序索引鍵,搭配遞減排序次序和預設定序 (Collation),排序給定的輸入集。

多載

OrderByDescending(DbExpression, Func<DbExpression,DbExpression>)

建立新的 DbSortExpression,它會依據指定的排序索引鍵,搭配遞減排序次序和預設定序 (Collation),排序給定的輸入集。

OrderByDescending(DbExpression, Func<DbExpression,DbExpression>, String)

建立新的 DbSortExpression,它會依據指定的排序索引鍵,搭配遞減排序次序和指定的定序 (Collation),排序給定的輸入集。

OrderByDescending(DbExpression, Func<DbExpression,DbExpression>)

建立新的 DbSortExpression,它會依據指定的排序索引鍵,搭配遞減排序次序和預設定序 (Collation),排序給定的輸入集。

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

參數

source
DbExpression

指定輸入集的運算式。

sortKey
Func<DbExpression,DbExpression>

方法,指定如何根據輸入集成員來衍生排序索引鍵運算式。 這個方法必須產生具有可比較順序之結果型別的運算式,這個字串結果型別會提供排序索引鍵定義。

傳回

新 DbSortExpression,表示 order-by 作業。

例外狀況

sourcesortKey 為 null。

-或-

sortKey 所產生的運算式為 null。

source 沒有集合結果類型。

-或-

sortKey 所產生的運算式沒有可比較順序結果類型。

適用於

OrderByDescending(DbExpression, Func<DbExpression,DbExpression>, String)

建立新的 DbSortExpression,它會依據指定的排序索引鍵,搭配遞減排序次序和指定的定序 (Collation),排序給定的輸入集。

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

參數

source
DbExpression

指定輸入集的運算式。

sortKey
Func<DbExpression,DbExpression>

方法,指定如何根據輸入集成員來衍生排序索引鍵運算式。 這個方法必須產生具有可比較順序之結果型別的運算式,這個字串結果型別會提供排序索引鍵定義。

collation
String

要做為排序依據的定序。

傳回

新 DbSortExpression,表示 order-by 作業。

例外狀況

sourcesortKeycollation 為 null。

-或-

sortKey 所產生的運算式為 null。

source 沒有集合結果類型。

-或-

sortKey 所產生的運算式沒有可比較順序字串結果類型。

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

適用於