DbExpressionBuilder.ToSortClauseDescending Method
Creates a new DbSortClause with a descending sort order and default collation.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() ![]() | ToSortClauseDescending(DbExpression) | Creates a new DbSortClause with a descending sort order and default collation. |
![]() ![]() | ToSortClauseDescending(DbExpression, String) | Creates a new DbSortClause with a descending sort order and the specified collation. |
DbExpressionBuilder.ToSortClauseDescending Method (DbExpression)
Creates a new DbSortClause with a descending sort order and default collation.
Parameters
- key
-
Type:
System.Data.Entity.Core.Common.CommandTrees.DbExpression
The expression that defines the sort key.
Return Value
Type: System.Data.Entity.Core.Common.CommandTrees.DbSortClauseA new sort clause with the given sort key and descending sort order.
Exception | Condition |
---|---|
ArgumentNullException | key is null. |
ArgumentException | key does not have an order-comparable result type. |
DbExpressionBuilder.ToSortClauseDescending Method (DbExpression, String)
Creates a new DbSortClause with a descending sort order and the specified collation.
public static DbSortClause ToSortClauseDescending( this DbExpression key, string collation )
Parameters
- key
-
Type:
System.Data.Entity.Core.Common.CommandTrees.DbExpression
The expression that defines the sort key.
- collation
-
Type:
System.String
The collation to sort under.
Return Value
Type: System.Data.Entity.Core.Common.CommandTrees.DbSortClauseA new sort clause with the given sort key and collation, and descending sort order.
Exception | Condition |
---|---|
ArgumentNullException | key is null. |
ArgumentOutOfRangeException | collation is empty or contains only space characters. |
ArgumentException | key does not have an order-comparable result type. |