I\'m pretty sure there\'s an example of this somewhere on here, I just can\'t find it as I don\'t know the exact terms. So please, be kind.
The problem should be a simpl
You can simulate with manual joins what EF does when you have relationships defined. All you need is to use Group Joins and projections. Something like this:
var result =
(from a in db.A
where a.Id == IDParameter
join b in db.B on a.Id equals b.AId into Bs
select new
{
a,
Bs =
(from b in Bs
join c in db.C on b.Id equals c.BId into Cs
select new
{
b,
Cs =
(from c in Cs
join d in db.D on c.Id equals d.CId into Ds
select new
{
c,
Ds = Ds.ToList()
}).ToList()
}).ToList()
}).ToList();