Entity framework returning incorrect data from columns with same name
I have a few tables in my database which are mapped to an edmx. Using the entity framework to return data from these tables, I've encountered a problem where the value in the "name" column from one of my higher level data models is being populated into each model below it. I'm pulling the data like this: var query = (from a in context.things where a.id == 1 select a); var model = query.Select(a => new modelA() { Name = a.name, Bs = a.Bs.Select(b => new modelB() { Name = b.name, Cs = b.Cs.Select(c => new modelC() { Name = c.name, Ds = c.Ds.Select(d => new modelD() { Name = d.name }) }) }) })