Linq Question about related entities
In my DAL, there is an entity.Select(int id) method that returns a .FirstOrDefault instance of the entity (from your code). The entity has a create user id and an update user id as properties. I need to be able to get the names associated with those id's and they are both related to the User entity.
It seems that if I look at the entity in the immediate window at a breakpoint in the DAL, I can see the entity.User collection, but when the entity gets to the entityBO, the collection has been disposed already.
How can I get the related entities to the BO? Do I need to run a separate linq query for each user? If I can attach the users to the original entity, how would I be able to associate the User with a createdId and updatedId?