The first 400 students can use code TRANSIT20 to get 20% off our new "From Zero to Hero: Messaging in .NET" course!

From Zero to Hero: Entity Framework Core in .NET

Learn how to use Entity Framework Core in your .NET applications

Entity Framework (EF) Core is a lightweight, extensible, open source and cross-platform object-relational mapper or ORM which enables .NET developers to work with a database using .NET objects and eliminates the need for most of the data-access code that typically needs to be written. Alongside Dapper, it is one of the two most popular ORMs in .NET, and given how much its performance has been improved in the last few .NET versions, it is an excellent choice for any .NET application. In this 8-and-a-half-hour-long course, Hannes Lowette will cover everything you need to know about Entity Framework Core, from its most basic concepts to its most advanced ones, including testing and different database providers. This course is effectively two courses bundled as one, and it is the best resource you could have to learn Entity Framework code in .NET with C#.

Curriculum

Welcome

0:34

What will you learn in this course?

1:13

Who is the course for?

1:25

What is an ORM?

3:23

Where are ORMs useful?

2:29

What is EF Core?

6:07

Introducing: the database context

2:05

How does a DbContext work?

2:25

Section recap

0:36

The application we will build the data access for

6:32

Creating our first EFCore Model

4:07

Getting the Model to work in our application

10:59

Implementing data manipulation operations

17:43

Implementing query behavior

8:15

Seeing what goes on in the Database

4:08

Projecting data to optimize queries

4:04

Section recap

0:54

Taking a look at the DB schema

2:34

Introducing DataAnnotations for our Model

4:49

Achieving similar results with FluentAPI

9:42

One-to-many relationships between entities

14:22

Converting between different data types

12:08

Using owned and complex types to group data

10:03

Generating values in the model

9:00

Hiding some database fields from our model

2:39

Applying global query filters

3:28

Section recap

1:08

Why do we need migrations?

2:50

The 2 migration philosophies

6:00

Adding our first migration

8:47

Adding migrations after changing the model

7:15

Executing Migrations from the CLI

5:23

Dealing with an out-of-sync model

8:42

The proper way to execute migrations

6:38

Section recap

0:41

What are the challenges in tests with ORMs?

4:59

Using Test databases

5:17

Using a database in memory

13:29

Faking DbSets in unit tests

10:10

The repository pattern

8:49

Integration testing with EF Core

4:26

Section recap

3:33

Introduction

0:53

Dependency Injection

8:23

Configuring Logging

10:06

DbContext Lifecycle

7:47

More on repositories

17:06

Different multi-tenant approaches

4:00

Multi-tenant with discriminators

9:35

Multi-tenant with separate databases

4:59

My take on architecture

4:47

Section recap

0:52

More DbContext features?

1:27

Using inheritance in your model

27:26

Using Alternate keys

5:37

One-to-one relationships

5:39

Many-to-many relationships

9:31

Using compound keys

3:14

Using raw SQL queries for your entities

7:36

Using keyless entities to query your database

5:31

Using the ChangeTracker for fun & profit

12:56

Section recap

1:20

The typical types of performance issues

4:19

Slow Queries & DB indices

7:58

Using compiled queries to improve runtime performance

7:00

Using batching to execute bulk queries

8:38

Loading related data - strategies

15:40

Untracked query results

3:23

Solving Concurrency Issues

10:58

Section recap

1:08

When the DB already exists

0:26

Using the DB to generate a model

9:43

How can we further evolve the model?

5:57

Regenerating every time: a demo

4:54

Keeping in sync manually: a demo

4:59

Section recap

0:07

EF Core isn't just for SQL server

0:59

Using another RDBMS's with EFCore

10:18

What is CosmosDB?

6:36

Switching our system to CosmosDB

15:30

Section recap

1:09

Conclusion

0:44

Course Info

Level:
From Zero to Hero
Duration:
8h 33m

Lifetime access

Buy Course Add to Cart
Dometrain Pro

Want access to all of our courses? Subscribe to Dometrain Pro!

Subscribe to Pro

About the Author

author_img

Hannes Lowette

With 20 years in .NET development, Hannes has always been passionate about performance, databases, distributed systems and large-scale applications. When it comes to architecture, his opinions have become a bit more nuanced, and the "it depends" card, however boring, gets played in many technical discussions. Hannes has always had a passion for sharing knowledge. It doesn't matter whether it is one-to-one while pair programming, on a conference stage giving a talk or when he's helping people succeed in their careers as a coach. In his free time, when he's not building LEGO® castles with his three kids, he likes to stream his guitar building on Twitch and spends too much time playing online chess and doing all-around geeky stuff. You can always lure him into a chat over a glass of great Whisky.

More courses by Hannes Lowette