EF6 has an overload of DbSet.Include, which takes a string parameter representing a list of related objects separated by periods to return in the query results. It is useful for high-load objects in a multi-level graph of objects. For instance:
var order = await _dbContext.Orders .Include(o => o.Customer) .Include("OrderDetails.Product")
This will return both related order details and populate the Product property of each part by creating an SQL statement that joins the OrderDetail and Product tables.
I am looking for a way to do this using EF7, but I do not see the DbSet.Include overload that takes a string path parameter. Does EF7 provide a way to achieve the same result as the EF6 API?
PS. I just noticed that issue # 1151 is open, and it looks like it can solve my question.
source share