Include is an Entity Framework Core query extension method that eagerly loads a related entity with the queried entity. Add a separate Include for each relationship that must be present in the returned objects. section 5.2.3
Loading books with ratings
Query the Books set and include each book's Ratings collection: dbContext.Books.Include(b => b.Ratings). The result can then print every book and its ratings without separately retrieving the related collection. section 5.2.3
Listing 5.8 One-to-one relationship with Book as the parent and Rating as the child
class Book {
public int Id {get;set;}
public Rating? Rating {get;}
}
class Rating
{
public int Id {get;set;}
public int BookId {get;set;}
public Book Book {get;set}
}
The related navigation-property model shows the relationship that Include makes available during eager loading. section 5.2.3

