IdeaBlade.Linq Assembly > IdeaBlade.Linq Namespace > DynamicQueryExtensions Class > ThenBy Method : ThenBy(ISortSelector,ISortSelector) Method |
'Declaration
<ExtensionAttribute()> Public Overloads Shared Function ThenBy( _ ByVal selector As ISortSelector, _ ByVal other As ISortSelector _ ) As CompositeSortSelector
'Usage
Dim selector As ISortSelector Dim other As ISortSelector Dim value As CompositeSortSelector value = DynamicQueryExtensions.ThenBy(selector, other)
[Extension()] public static CompositeSortSelector ThenBy( ISortSelector selector, ISortSelector other )
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 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