How to get foreign key value for independent association without hitting database?
I am using independent associations (with lazy loading) to access related entities in my code first model e.g. public class Aaa { public int AaaId {get;set;} public string SomeValue {get;set;} } public class Bbb { public int BbbId {get;set;} public string SomeValue {get;set;} public virtual Aaa MyIndependentAssociation {get;set;} } but I am wondering how to access the foreign key value of MyIndependentAssociation without actually loading the record. I am assuming the Aaa_AaaId value is actually loaded when I retrieve a Bbb entity from the database (according the debug visualizer on the entity