DbExpressionBuilder.OrderByDescending 方法

定義

建立一個新檔案 DbSortExpression ,將指定排序鍵排序給定輸入,排序順序由降到低,預設排序方式。

多載

名稱 Description
OrderByDescending(DbExpression, Func<DbExpression,DbExpression>)

建立一個新檔案 DbSortExpression ,將指定排序鍵排序給定輸入,排序順序由降到低,預設排序方式。

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

建立一個新檔案 DbSortExpression ,依指定排序鍵排序給定輸入,排序順序由降到低,並依照指定的排序方式排序。

OrderByDescending(DbExpression, Func<DbExpression,DbExpression>)

建立一個新檔案 DbSortExpression ,將指定排序鍵排序給定輸入,排序順序由降到低,預設排序方式。

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

-或-

sortKey 產生的表達式為零。

source 沒有集合結果類型。

-或-

sortKey 產生的表達式沒有可比階的結果類型。

適用於

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

建立一個新檔案 DbSortExpression ,依指定排序鍵排序給定輸入,排序順序由降到低,並依照指定的排序方式排序。

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 操作。

例外狀況

source,或 sortKeycollation 為零。

-或-

sortKey 產生的表達式為零。

source 沒有集合結果類型。

-或-

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

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

適用於