liveBook · Manning

Include

Include is an Entity Framework Core query extension method that specifies related navigation properties to load with queried entities.

How 2 Manning books explain it

Pro ASP.NET Core 7, Tenth Edition

An Entity Framework Core query method that specifies a related navigation property to load with an entity.

How it is used
Loads navigation properties needed by repository queries and ASP.NET Core API responses.
How deep it goes
Explains relationship traversal and nested ThenInclude usage, then diagnoses circular serialization without detailing generated SQL.
Examples
Uses order lines with products and suppliers with products as concrete related-data query examples.
What you can do after
Apply it via Entity Framework Core to retrieve related entities and diagnose object-cycle failures in serialized API responses.

Read how Pro ASP.NET Core 7, Tenth Edition explains Include →

.NET in Action, Second Edition

Include is an Entity Framework Core query extension method that specifies related entities to load with the queried entities.

How it is used
Loads related entities alongside queried entities when a returned object needs its relationships populated.
How deep it goes
Explains separate Includes, eager-versus-lazy loading, and alternative loading approaches without detailing query translation internals.
Examples
Demonstrates loading Book entities with their Ratings collection and printing the results to the console.
What you can do after
Apply it via Entity Framework Core to retrieve books together with their ratings in one eager-loading query.

Read how .NET in Action, Second Edition explains Include →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.