Linq to Entities - eager loading using Include()
问题 I've got this really basic table structure: dbo.tblCategory dbo.tblQuestion (many to one relationship to tblCategory) dbo.tblAnswer (many to one relationship to tblQuestion) So basically, what I'm trying to do is when I load a category, I want to also load all Questions, and all Answers. Now, I've been able to do this using the following code: public tblCategory Retrieve(int id) { using (var entities = Context) { var dto = (from t in entities.tblCategory.Include("tblQuestion") .Include(