| Visual Basic (Declaration) | |
|---|---|
<ExtensionAttribute()> Public Shared Function ThenBySelector(Of TSource)( _ ByVal source As IEntityQuery(Of TSource), _ ByVal selector As ISortSelector _ ) As IEntityQuery(Of TSource) | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim source As IEntityQuery(Of TSource) Dim selector As ISortSelector Dim value As IEntityQuery(Of TSource) value = EntityQueryExtensions.ThenBySelector(Of TSource)(source, selector) | |
| C# | |
|---|---|
[ExtensionAttribute()] public static IEntityQuery<TSource> ThenBySelector<TSource>( IEntityQuery<TSource> source, ISortSelector selector ) | |
| C++/CLI | |
|---|---|
[ExtensionAttribute()] public: static IEntityQuery<TSource^>^ ThenBySelectorgeneric<typename TSource> ( IEntityQuery<TSource^>^ source, ISortSelector^ selector ) | |
Parameters
- source
- selector
Type Parameters
- TSource
Return Value
A query containing the sort criteria| 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(); } | |
Use this method along with the OrderBySelector(ITypedEntityQuery,ISortSelector) to add dynamically-created sort criteria to a query.
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