© Eric Vogel 2021
E. VogelBeginning Entity Framework Core 5https://doi.org/10.1007/978-1-4842-6882-7_11

11. Navigation Properties

Eric Vogel1  
(1)
Okemos, MI, USA
 

In this chapter, I will cover how to map both a one-to-many and a many-to-many entity relationship using Entity Framework Core 5 through using navigation properties. We have already created half of the code to create these relationships earlier in the book when we mapped one-to-many addresses to a person record. I will now show how to complete the one-to-many mapping between Person and Address entities. I will also cover how to add a many-to-many parent/child relationship through navigation properties.

Mapping a Parent Entity in a One-to-Many Relationship

In our example in Chapter 10 to map ...

Get Beginning Entity Framework Core 5: From Novice to Professional now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.