Given the object hierarchy
public class Parent
{
public int Id { get; set; }
public virtual Child Child { get; set; }
}
public class Child
{
pub
Update: If you are using Entity Framework Core you should use the following syntax
var hierarchy = from p in ctx.Parents
.Include(p => p.Children)
.ThenInclude(c => c.GrandChild)
select p;
Sure, you can do
var hierarchy = from p in ctx.Parents
.Include(p => p.Children.Select(c => c.GrandChild))
select p;
See MSDN, caption Remarks, the fifth bullet.