How can I find the Id property or properties related to a navigational property?
问题 For a project I'm working with Entity Framework and I'd like to be able to enumerate all navigational properties for a given object instance (assuming it's an object generated by EF). From there I'd like to get the related Id property for every navigational property. For example, if I get an instance of the class Person , I want to be able to find it's navigational properties called Address and Boss . For those two navigational properties I want to then "lookup" the related Id properties