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;
More Related Contents:
- ASP.NET MVC 2.0 Implementation of searching in jqgrid
- What’s the difference(s) between .ToList(), .AsEnumerable(), AsQueryable()?
- The specified type member ‘Date’ is not supported in LINQ to Entities Exception
- Best way to check if object exists in Entity Framework? [closed]
- Entity Framework 4 / POCO – Where to start? [closed]
- LINQ to Entities for subtracting 2 dates
- LINQ To Entities + Include + Anonymous type issue
- EF4 LINQ Ordering Parent and all child collections with Eager Loading (.Include())
- ORM Entities vs. Domain Entities under Entity Framework 6.0
- LEFT JOIN in LINQ to entities?
- How to compare only date components from DateTime in EF?
- Entity Framework validation with partial updates
- Solution for “Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details.”
- NOT using repository pattern, use the ORM as is (EF)
- How do you update an edmx file with database changes?
- Cascading deletes with Entity Framework – Related entities deleted by EF
- EF Query With Conditional Include
- Entity Framework CTP 4 – Code First Custom Database Initializer
- How do I singularize my tables in EF Code First?
- Set decimal(16, 3) for a column in Code First Approach in EF4.3 [duplicate]
- Upgrade EF 4 EDMX to EF 6
- Efficient way to do bulk insert/update with Entity Framework
- Entity Framework and calling context.dispose()
- Entity Framework Code First : Setting up One-To-One foreign key association using Annotations
- Error 6002: The table/view does not have a primary key defined
- check constraint entity framework
- int to string in Entity Framework
- Entity Framework: Inheritance and Include
- Entity Framework – Get List of Tables
- Entity framework code first delete with cascade