Module 11 of 12

Data Access with EF Core

Lessons

About This Module

Almost every real application needs to store data in a database. Writing SQL by hand for every operation is slow and error prone, so most C# developers use Entity Framework Core (EF Core), which lets you work with database tables as ordinary C# classes.

This module starts with what an ORM is, then walks through the DbContext, entity classes, and code-first migrations that create and update your database. It finishes with relationships between tables, such as one-to-many and many-to-many.

Watch the lessons in order, then continue on to Testing & Deployment.

Lessons

4 videos
01

Entity Framework Core Crash Course

Introduces Entity Framework as an object relational mapper (ORM) that helps you build databases quickly, covering the core basics.

02

Entity Framework Code First Approach: DbContext and Migration

Builds a first EF Core setup from scratch: configuring the DbContext, creating an entity class, and connecting to SQL Server.

03

Entity Framework Core - Code First, Migrations, and SQL Server

A step-by-step look at the code-first approach inside an ASP.NET Core Web API application, with migrations and SQL Server.

04

Mastering EF Core Relationships: One-to-One, One-to-Many, and Many-to-Many

Shows how to implement the three kinds of database relationships using Entity Framework Core 8.