There is an issue with the Entity Framework Beta 3. If you use the EntityReference Object’s Load() Method and the Result is null then the IsLoaded bit is not set.
This is nasty because the EF will always try to load the Reference from the Database.
Or I made a mistake…
Here is an example:
[EdmRelationshipNavigationPropertyAttribute("Model", "FK_Auftrag_Mitarbeiter", "A_Mitarbeiter")]
public App.Mitarbeiter Mitarbeiter
{
get
{
EntityReferenceMitarbeiter> r =
((IEntityWithRelationships)(this)).RelationshipManager
.GetRelatedReferenceMitarbeiter>
("Model.FK_Auftrag_Mitarbeiter", "A_Mitarbeiter");
if (!r.IsLoaded)
r.Load();
return r.Value;
}
}