Entity Framework GroupJoin and enable

For some reason, I could not include any objects associated with the object in the GroupJoin statement.

public class Faclility{public List<Room> {get;set;}}
public class Room{public List<Chairs> {get;set;}}

dbContext.Facilities.GroupJoin(db.Room.Include(x=>x.Chairs),f=>f.fUnitโ€Œโ€‹ID,r=>r.fUnitID,(f,result)=> new {})

The request works, I got some results. However, all objects of the โ€œchairโ€ are null.

+4
source share
1 answer

No high chairs should be

public virtual List<Chairs> {get;set;}

Also, how do you place chairs in a room? Using the Fluent API?

0
source

All Articles