I\'m not sure about Navigational Properties in EF 4 so I would kindly ask you an explanation.
Lets imagine this scenarios:
A)
I have two Entities
Here is a way to check if related records for an entity is loaded or not.
For entity where you have multiple records related to entity you can check like below.(One to many relationship)
myDbContext.Entry(MyEntity).Collection(x => x.NavigationalProperyName).IsLoaded
And If have only one record related to entity, then you can check like below.(One to one relationship)
myDbContext.Entry(MyEntity).Reference(x => x.NavigationalProperyName).IsLoaded
Do you mean:
// -to-one relationship
entity.RelatedItemReference.IsLoaded
// -to-many relationship
entity.RelatedItems.IsLoaded