DevForce Help Reference
OrderBySelector<TSource>(IEntityQuery<TSource>,ISortSelector) Method
Example 


Sorts the elements of a sequence according to a IdeaBlade.Linq.SortSelector containing one or more sort criteria.
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Overloads Shared Function OrderBySelector(Of TSource)( _
   ByVal source As IEntityQuery(Of TSource), _
   ByVal selector As ISortSelector _
) As IEntityQuery(Of TSource)
'Usage
 
Dim source As IEntityQuery(Of TSource)
Dim selector As ISortSelector
Dim value As IEntityQuery(Of TSource)
 
value = EntityQueryExtensions.OrderBySelector(Of TSource)(source, selector)

Parameters

source
selector

Type Parameters

TSource

Return Value

A query containing the sort criteria
Remarks
Use this method to add dynamically-created sort criteria to a query.
Example
public void OrderBySample1() {
  var mgr = new DomainModelEntityManager();
  var selector = new SortSelector(typeof(Customer), "Country", ListSortDirection.Descending);
  var results = mgr.Customers.OrderBySelector(selector).ToList();    
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EntityQueryExtensions Class
EntityQueryExtensions Members
Overload List

Send Feedback