The code that I was trying to execute looked something like this:
Click for larger image |
This is the XML |
The problem is that without any changes to the DynamicLibrary you get some error that either the Element is not a method of your object or your orderby selection is not a valid property. Ultimately it means that LINQ to XML doesn't support this right out of the box. Now I read another post that stated that the problem was that a few Objects were not in the predefinedTypes and so that got me thinking and I modified the Dynamic.vb file in my project...thats right V freakin B. I am sure the changes are quite similar in the Dynamic.cs file if you are programming in C#, but I was programming in VB.
Change your predefinedTypes to look like this and recompile and you should be able to do dynamic OrderBy with LINQ to XML:
No comments:
Post a Comment