Press Ctrl / CMD + C to copy this to your clipboard.
Hey folks. I have been scouring this forum for many days trying to solve a problem.
I have a list of department_ids and would like to query the Departments node for the children with department_id in the list. Is there a way to do this? Ultimately I'd like to order by department name as well.
Departments - department_id 1 - department_id 2 - department_id 3 - department_id 4 - department_id 5 - department_id 6
I have tried a few approaches but they've failed. The last try was:
DynamicNodeList retList = from p in @Model.XPath("/root/Departments/Department") where departmentIDList.Contains( p.department_id ) select p;
This gives me "Query expressions over source type 'dynamic' or with a join sequence of type 'dynamic' are not allowed"
n/m part 5 of the walkthrough had something I could use with the Dictionary example.
Seems to working just wondering how efficient that is...
Write your reply to:
Image will be uploaded when post is submitted