6
Data Access in ASP.NET Core (Part 2 – Entity Relationships)
In Chapter 5, we introduced the fundamentals of Entity Framework Core (EF Core), including how to create a DbContext class and how to use it to access data.
You can recap the basic concepts of relationships in Chapter 1, in the Defining the Relationships between Resources section, where we introduced relationships between resources. For example, in a blog system, a post has a collection of comments, and a user has a collection of posts. In an invoice system, an invoice has a collection of invoice items, and an invoice item belongs to an invoice. An invoice also has a contact, which can have one or more contact persons and can have one address.
In this chapter, we will continue to ...
Get Web API Development with ASP.NET Core 8 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.