Entity Framework: how to do correct “Include” on custom type
问题 Suppose we have 2 types, mapped to a Database via EF 4. Schedule 1.....1 Visit Also, we have third custom view type public class ScheduleView { public Schedule Schedule { get; set; } public Visit Visit { get; set; } } So we can write the join query var query = Context.Schedule.Join(Context.Visit ,/*Schedule join key definition*/,/*Visit join key definition*/, (scheduleView, visit) => new ScheduleView {Schedule = scheduleView, Visit = visit}) The problem is that I need to load also Patient