LINQ include multiple children
Another way to achieve the same is
var qry = from d in context.Databases
.Include(x => x.Tables)
.Include(x => x.Tables.Select(c => c.Fields))
.Include(x => x.Tables.Select(f => f.ForeingKeys))
select d;
I prefer do not use literals.
var qry = from d in context.Databases
.Include("Tables.Fields")
.Include("Tables.ForeingKeys")
select d;
EF will automatically include tables for you and then include those navigation properties in the query.