DbExpressionBuilder.ToSortClause 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個新的, DbSortClause 排序順序由高到低,並預設排序。
多載
| 名稱 | Description |
|---|---|
| ToSortClause(DbExpression) |
建立一個新的, DbSortClause 排序順序由高到低,並預設排序。 |
| ToSortClause(DbExpression, String) |
建立 DbSortClause 一個排序順序由高到低的新排序,並依照指定的排序方式。 |
ToSortClause(DbExpression)
建立一個新的, DbSortClause 排序順序由高到低,並預設排序。
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbSortClause ^ ToSortClause(System::Data::Common::CommandTrees::DbExpression ^ key);
public static System.Data.Common.CommandTrees.DbSortClause ToSortClause(this System.Data.Common.CommandTrees.DbExpression key);
static member ToSortClause : System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbSortClause
<Extension()>
Public Function ToSortClause (key As DbExpression) As DbSortClause
參數
- key
- DbExpression
定義排序鍵的表達式。
傳回
一個新的排序子句,包含給定的排序鍵和遞增排序順序。
例外狀況
key 為 null。
key 沒有階數可比較的結果類型。
適用於
ToSortClause(DbExpression, String)
建立 DbSortClause 一個排序順序由高到低的新排序,並依照指定的排序方式。
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbSortClause ^ ToSortClause(System::Data::Common::CommandTrees::DbExpression ^ key, System::String ^ collation);
public static System.Data.Common.CommandTrees.DbSortClause ToSortClause(this System.Data.Common.CommandTrees.DbExpression key, string collation);
static member ToSortClause : System.Data.Common.CommandTrees.DbExpression * string -> System.Data.Common.CommandTrees.DbSortClause
<Extension()>
Public Function ToSortClause (key As DbExpression, collation As String) As DbSortClause
參數
- key
- DbExpression
定義排序鍵的表達式。
- collation
- String
要整理的集合。
傳回
一個新的排序子句,包含給定的排序鍵和排序,排序順序由上升到高。
例外狀況
key 為 null。
collation 是空的或僅包含空格字元。
key 沒有階數可比較的結果類型。