I have a table Test with a foreign key to itself. In metadata class I have
[Include]
Test Test2 { get; set; }
In a service class:
return this.ObjectContext.Test.Include("Test2")
I checked that data loaded correctly from database. But on a client side I see that no parent has been loaded.
I use a DomainDataSource to load data (Silverlight 4.0).
Someone else experienced this strange behavior?
Ok, my mistake. The answer is to use [Include] attribute as always, but make sure that all participating properties are public in your metadata class.