EntityQueryable.OrderByDescending<TEntity, TKey> Method

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Applies the specified descending order clause to the source query.

Namespace:  System.ServiceModel.DomainServices.Client
Assembly:  System.ServiceModel.DomainServices.Client (in System.ServiceModel.DomainServices.Client.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function OrderByDescending(Of TEntity As Entity, TKey) ( _
    source As EntityQuery(Of TEntity), _
    keySelector As Expression(Of Func(Of TEntity, TKey)) _
) As EntityQuery(Of TEntity)
'Usage
Dim source As EntityQuery(Of TEntity)
Dim keySelector As Expression(Of Func(Of TEntity, TKey))
Dim returnValue As EntityQuery(Of TEntity)

returnValue = source.OrderByDescending(keySelector)
public static EntityQuery<TEntity> OrderByDescending<TEntity, TKey>(
    this EntityQuery<TEntity> source,
    Expression<Func<TEntity, TKey>> keySelector
)
where TEntity : Entity
[ExtensionAttribute]
public:
generic<typename TEntity, typename TKey>
where TEntity : Entity
static EntityQuery<TEntity>^ OrderByDescending(
    EntityQuery<TEntity>^ source, 
    Expression<Func<TEntity, TKey>^>^ keySelector
)
static member OrderByDescending : 
        source:EntityQuery<'TEntity> * 
        keySelector:Expression<Func<'TEntity, 'TKey>> -> EntityQuery<'TEntity>  when 'TEntity : Entity
JScript does not support generic types and methods.

Type Parameters

  • TEntity
    The entity type being queried.
  • TKey
    The type of the member being ordered by.

Parameters

Return Value

Type: System.ServiceModel.DomainServices.Client.EntityQuery<TEntity>
A EntityQuery<TEntity> with the specified descending order clause.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type EntityQuery<TEntity>. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also

Reference

EntityQueryable Class

System.ServiceModel.DomainServices.Client Namespace