I have a problem with .include method of Self-Tracking Entity. My table called documents have relations to tables States, Companies, Workers and Departments. I want to load all documents with this related data. Im tring do this like that:
context.Documents.Include("Workers.Departments.States.Companies").ToList();
But this throws me a exception:
A specified Include path is not valid. The EntityType „workflowModel.Department" does not declare a navigation property with the name „States”.
The same error also for Companies. What is strange Workers and Departments works. I does not work also for Company and State (I've used built in pluralization and singularization). I double checked the name on model (Entity Set Name property) and copied the names and still didnt work. Have some one idea what is going on? Or maybe some other method to load all this data? Thanks in advance for any help!