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