Include method for one to many relationships in EF Core

Published: 18 February 2024
on channel: Round The Code
1,334
19

Learn how to use the Include method in Entity Framework Core to create a one to many relationship query.

This tutorial will involve adding a new entity which will be populated using data seeding and will use EF Core migrations to add it to the SQL Server database.

We'll then use ASP.NET Core Web API endpoints to write LINQ queries that use a one to many relationship. We'll also have a look at inserting and updating a record which has a foreign key.

► This is part 5 of our Get started with EF Core course. View the full playlist:
   • Get started with EF Core - Full course  

💻 Download the code example💻
https://www.roundthecode.com/dotnet-c...

📖 Learn .NET and C# with our online courses 📖
https://www.roundthecode.com/dotnet-c...

👨‍💻Take our .NET and C# coding challenges👨‍💻
https://www.roundthecode.com/dotnet-c...

► Chapters
0:00 What we'll cover
0:14 Creating a relationship entity
1:02 Relationship entity type configuration
2:47 Relationship migration
4:18 Insert & update using a relationship
6:05 Query using a relationship
7:56 Learn more about EF Core

#efcore #entityframework #entityframeworkcore


Watch video Include method for one to many relationships in EF Core online without registration, duration hours minute second in high quality. This video was added by user Round The Code 18 February 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,334 once and liked it 19 people.