I know that this will not work as it is written, but I try my best to find the right answer, and this non-functional code, hopefully, illustrates what I am trying to achieve:
var defaults = _cilQueryContext.DefaultCharges
.Where(dc => dc.ChargingSchedule_RowId == cs.RowId);
List<DevelopmentType> devTypes =
defaults.Select(dc => dc.DevelopmentType)
.Include(d => d.DefaultCharges)
.Include(d => d.OverrideCharges.Where(oc => oc.ChargingSchedule_RowId == cs.RowId))
.Include(d => d.OverrideCharges.Select(o => o.Zone))
.ToList();
Essentially, I assumed that this requires a connection, but, seeing that I am trying to select a parent containing two sibling types of children, I don’t see what will be in the join section "select new".
source
share