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#.
Course Curriculum
8h 33m 12 sections
Welcome
00:34Free preview
What will you learn in this course?
01:13Free preview
Who is the course for?
01:25Free preview
What is an ORM?
03:23
Where are ORMs useful?
02:29
What is EF Core?
05:16
Introducing: the database context
02:05
How does a DbContext work?
02:25
Section recap
00:36
The application we will build the data access for
06:32
Creating our first EFCore Model
04:07
Getting the Model to work in our application
10:59
Implementing data manipulation operations
17:43
Implementing query behavior
08:15
Seeing what goes on in the Database
04:08
Projecting data to optimize queries
04:04
Section recap
00:54
Taking a look at the DB schema
02:34
Introducing DataAnnotations for our Model
04:49
Achieving similar results with FluentAPI
09: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
09:00
Hiding some database fields from our model
04:09
Applying global query filters
03:28
Section recap
01:08
Why do we need migrations?
02:50
The 2 migration philosophies
06:00
Adding our first migration
08:47
Adding migrations after changing the model
07:15
Executing Migrations from the CLI
05:23
Dealing with an out-of-sync model
06:11
The proper way to execute migrations
06:38
Section recap
00:41
What are the challenges in tests with ORMs?
04:59
Using Test databases
05:17
Using a database in memory
13:29
Faking DbSets in unit tests
10:09
The repository pattern
08:49
Integration testing with EF Core
04:26
Section recap
03:32
Introduction
00:53
Dependency Injection
08:23
Configuring Logging
10:06
DbContext Lifecycle
07:46
More on repositories
17:06
Different multi-tenant approaches
04:00
Multi-tenant with discriminators
09:35
Multi-tenant with separate databases
04:59
My take on architecture
04:47
Section recap
00:52
More DbContext features?
01:27
Using inheritance in your model
27:26
Using Alternate keys
05:37
One-to-one relationships
05:39
Many-to-many relationships
09:30
Using compound keys
03:14
Using raw SQL queries for your entities
07:36
Using keyless entities to query your database
05:31
Using the ChangeTracker for fun & profit
12:56
Section recap
01:20
The typical types of performance issues
04:19
Slow Queries & DB indices
07:58
Using compiled queries to improve runtime performance
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.