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.
11. Navigation Properties
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.