| Visual Basic (Declaration) | |
|---|---|
<ExtensionAttribute()> Public Overloads Shared Function ThenBy( _ ByVal selector As ISortSelector, _ ByVal other As ISortSelector _ ) As CompositeSortSelector | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim selector As ISortSelector Dim other As ISortSelector Dim value As CompositeSortSelector value = DynamicQueryExtensions.ThenBy(selector, other) | |
| C# | |
|---|---|
[ExtensionAttribute()] public static CompositeSortSelector ThenBy( ISortSelector selector, ISortSelector other ) | |
| C++/CLI | |
|---|---|
[ExtensionAttribute()] public: static CompositeSortSelector^ ThenBy( ISortSelector^ selector, ISortSelector^ other ) | |
Parameters
- selector
- other
| C# | Copy Code |
|---|---|
public void DynamicQueryOrder() { var entityType = typeof(Product); var baseQuery = EntityQuery.Create(entityType); var pd = new PredicateDescription("UnitPrice", FilterOperator.IsGreaterThanOrEqualTo, 24); var ps = new SortSelector("Category.Name").ThenBy(new SortSelector("ProductName")); var query = baseQuery.Where(pd).OrderBySelector(ps); var results = manager.ExecuteQuery(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