Entity Framework - Programmatically add Includes to ObjectQuery
问题 I have a Entity Framework model where I have a user which has the following relationships: User 1-* Test Each Test has the following relationships: Test 1-1 Course Test 1-* TestEvent I have a service that returns a user and at different points in my application I want to eagerly fetch various relationships. I am fetching all the relationships at present: var result = (from appUser in context.AppUsers.Include("Tests.Course") .Include("Tests.TestEvents") where appUser.Login.ToLower() ==