I have a join
var result = from a in dbContext.As
join b in dbContext.Bs on a.Id equals b.A.Id
select { A = a, Ds = b.AList.Select(listItem => listItem.ObjectOfTypeD) }
how can I flatten the result so instead of list of Ds I get list of a single D linked with single A ?
You can try adding another from:
Or using
SelectMany:Note that if you have correctly set up the relationships between the entities in the model usually there is no need to use manual joins, so you can try something like: