I'm hoping someone out in the SO community will be able to help me out here.
Simplified Background: I'm using Entity Framework V1 to build my class structure that is outlined below, I'm using Table Per Type to persist my inherited objects:
Employee
CaseA : Case
CaseB : Case
CaseC : Case
CaseB has a Navigational Property to Employee
I have a Repository that returns an ObjectQuery. If the type of Case is actually CaseB, I need to include the Employee object within the graph. I can't .Include("Employee") because it's not a navigational property of Case, and Employee doesn't have a .Load() method on it.
Ideally I want to be able to do this in one query, however as a fall back I'm happy that I make a call, check the Object and perform another call, something like this: (although as I stated earlier, load doesn't exist on the employee navigational property)
//Get the case from the
Case myCase = new Repo<Case, Entities>.FirstOrDefault();
if(myCase is CaseB)
((CaseB)myCase).Employees.load();
Am I missing something really simple here?