Usage is: @foreach(var item in home.ChildItems.OrderBy("catCount, colour desc"))
If you use the simple form of home.ChildItems.OrderBy("catCount") it will use a simpler/faster implementation
Only supports single pass, ascending currently, so no ThenBy implementation or Descending variants
The original query parser supports OrderBy("catCount, name desc") by nesting Expression.Call
Current implementation for DynamicNodeList supports OrderBy("catCount") only
Already had support for YesNoType (where the string value is 1 or 0) being converted/parsed to boolean
Added some TryParse calls to int and decimal respecitvely so that if a IProperty.Value is a valid decimal or int it will be returned from DynamicNode.TryGetMember as such
This enables the .Where operator to have the correct type after property retrieval so that some numerical comparisons will work
Added support for >, >=, <, <= and %[mod] to .Where
@Model.Children.Where("catCount > 1")
@Model.Children.Where("catCount % 2 == 0")
Refactored GenerateEqual into a Factory method HandleDynamicNodeLambdas that takes an ExpressionType
Implemented Expression.NotEqual
@Model.Children.Where("shouldBeVisible != true") => children that are hidden
e.g. @Model.Children.Where("shouldBeVisible == true")
Also changed internal where implementation to handle Func<DynamicNode,bool> as well as Func<DynamicNode,object>
Both left & right side as lambda expressions should work (though I haven't tested this yet)
e.g. @Model.Children.Where("property1 == property2")
Only == (Expression.Equals) is supported currently due to the extra code required to invoke the lambda when generating the final comparison expression