This chapter covers
- Configuring relationships using By Convention
- Configuring relationships using Data Annotations
- Configuring relationships using Fluent API
- Other ways to map entities to database tables
Chapter 6 described how to configure scalar, or nonrelational, properties. This chapter covers how to configure database relationships. I assume you’ve read at least the first part of chapter 6, because configuring relationships uses the same three approaches, By Convention and Data Annotations and the Fluent API, to map the database relationships.
This chapter covers how EF Core finds and configures relationships between entity classes, with pointers on how to configure each type of relationship—one-to-one, ...