I have a simple data structure
- Employee
- Employee has List
- Education has University, Department
- Department and University has Name as string (I mean Dept. and Univ. are also entity)
My question is, how can I eagerly load specific Employee's education list and each education's university and department information in Entity Framework.
In ASP.NET MVC tutorials there is a query like:
var viewModel = new InstructorIndexData();
viewModel.Instructors = db.Instructors
.Include(i => i.OfficeAssignment)
.Include(i => i.Courses.Select(c => c.Department))
.OrderBy(i => i.LastName);
But my include takes only string parameter (with using System.Linq)
How can I solve this problem?
Thank you...