In this video aimed at folks new to EF Core, Phil Japikse shows how to start with an existing SQL Server database, create entities/objects for each table and then how to perform basic CRUD operations on the data.
Find the sample code here.
- Part 1: Working with Existing Databases (this episode).
- Part 2: Change Tracking. Change Tracking is one of the most compelling reasons to use an object-relational-mapper (ORM) like EF Core. In this episode we discuss how the change tracker works, see it in action, as well as load data outside of the change tracker.
- Part 3: Basic Queries (coming soon). This episodes querying data using EF Core. We discuss the basics of where clauses, retrieving single items or lists of items, as well as when queries actually execute.
- Part 4: Querying Related Data and Using Projections (coming soon). Querying related data is simple in EF Core, and In this episode we demonstrate creating joins in our LINQ queries with Include and ThenInclude. We also discuss how you use projections to shape the queried data into other objects, anonymous or strongly typed.
- Part 5: Putting the CUD into CRUD (coming soon). Wrapping up our starter series on EF Core, this episode covers adding, updating, and deleting data using EF Core.