DevForce Help Reference
OrderBySelector(ITypedEntityQuery,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( _
   ByVal source As ITypedEntityQuery, _
   ByVal selector As ISortSelector _
) As ITypedEntityQuery
'Usage
 
Dim source As ITypedEntityQuery
Dim selector As ISortSelector
Dim value As ITypedEntityQuery
 
value = EntityQueryExtensions.OrderBySelector(source, selector)

Parameters

source
selector

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