DbExpressionBuilder.ToSortClauseDescending Method

 

Creates a new DbSortClause with a descending sort order and default collation.

Namespace:   System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticToSortClauseDescending(DbExpression)

Creates a new DbSortClause with a descending sort order and default collation.

System_CAPS_pubmethodSystem_CAPS_staticToSortClauseDescending(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.

public static DbSortClause ToSortClauseDescending(
	this DbExpression key
)

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.DbSortClause

A 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.DbSortClause

A 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.