c# - How can I find the Id property or properties related to a navigational property? -
for project i'm working entity framework , i'd able enumerate navigational properties given object instance (assuming it's object generated ef). there i'd related id property every navigational property. for example, if instance of class person , want able find it's navigational properties called address , boss . 2 navigational properties want "lookup" related id properties called addressid , bossid . i need id properties can run queries on different database not have same foreign keys have same ids. so far have figured out way relationshipmanager random object instance generated ef. , while debugging can foreign key relations via manager's relationships property. can far navigational property name. can see there's fk_person_address related navigational property called address can't find addressid . so question is, how can dynamically (with no knowledge of person class' layout) discover addressid property related address...