I’m using EF 4 with POCO and lazy loading and proxy creation disabled (due to serialization requirements). I have two tables that have a many to many relationship using a third cross-reference table. In EF, the cross-reference entity does not exist and I have one to many navigation properties on both sides of the entity relationships (as expected).
However, when I use the naviation property of one of the entities that I have confirmed via SQL Manager queries to have data, I get an empty result set.
Has anyone else run into this? If so, any advice on how to resolve would be most appreciated.
Thanks!
You need to use LoadProperty or Include method.
More from [MSDN]
“Because POCO entities do not have the same relationship requirements as objects that inherit from EntityObject, a slightly different process is required to load related objects”