Hi Pando,
Could you explain the “association properties” you mentioned?
If you mean the navigate properties, that is because the scenario does meet the requirement to get navigate properties.
Only when the parent and children is in the objectcontext, you can get navigate properties.
For example,
var q= slecect p in context.Parents.Include(“Children”) where … select p;
In that way, the parent and children are all in the context. Then you can use,
Foreach(var p in q)
{
Foreach(var c in p.Children)
{
………
}
}
Does this work for you? If you have any questions or concerns, please update the thread and we will have a further discussion.
Best Regards
Yichun Feng
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.