Here is my simplest structure
Customer
CustomerID
FirstName
LastName
...
BrokerID <- Navigation Property created with this FK
Broker
BrokerID
FirstName
LastName
Now my question is, if I load multiple customers, and I want to see list of customer and I also need to see the Name of Broker associated with the customer, now one broker will probably have many customers, so multilple customers returned will most likely have repeated BrokerIDs.
I guess by default EF will return new instance of Broker for every customer and it will query load broker for every broker even if it is repeated.
Is there anyway I can make EF not load broker if the same broker was loaded before? Does this kind of caching (only for small sessoin) exist in EF or I have to add my own implementation of Navigation Properties?