TSource
IdeaBlade DevForce 2010 Help Reference
ThenBySelector<TSource> Method
See Also  Example Send Feedback
IdeaBlade.Linq Assembly > IdeaBlade.Linq Namespace > QueryableExtensions Class : ThenBySelector<TSource> Method



source
sortSelector
Sorts the elements of a sequence according to a SortSelector. Sorts on multiple properties are supported.

Syntax

Visual Basic (Declaration) 
<ExtensionAttribute()>
Public Shared Function ThenBySelector(Of TSource)( _
   ByVal source As IOrderedQueryable(Of TSource), _
   ByVal sortSelector As ISortSelector _
) As IOrderedQueryable(Of TSource)
Visual Basic (Usage)Copy Code
Dim source As IOrderedQueryable(Of TSource)
Dim sortSelector As ISortSelector
Dim value As IOrderedQueryable(Of TSource)
 
value = QueryableExtensions.ThenBySelector(Of TSource)(source, sortSelector)
C++/CLI 
[ExtensionAttribute()]
public:
static IOrderedQueryable<TSource^>^ ThenBySelectorgeneric<typename TSource>
( 
   IOrderedQueryable<TSource^>^ source,
   ISortSelector^ sortSelector
) 

Parameters

source
sortSelector

Type Parameters

TSource

Example

C#Copy Code
public void ThenBySample1() {
  var mgr = new DomainModelEntityManager();
  var selector1 = new SortSelector(typeof(Customer), "Country");
  var selector2 = new SortSelector(typeof(Customer), "CompanyName");
  var results = mgr.Customers.OrderBySelector(selector1).ThenBySelector(selector2).ToList();
}

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.