Building Your First Application Using Ef Core Slides
Building Your First Application Using Ef Core Slides
Getting Started
CREATING YOUR FIRST APP USING EF CORE 5.0
Julie Lerman
MOST TRUSTED AUTHORITY ON ENTITY FRAMEWORK
@julielerman thedatafarm.com
Updated completely for
EF Core 5.0
Using Visual Studio 2019
Looking for
EF Core 3.1?
bit.ly/EFCore31
Older versions
via my
Pluralsight
Author Page
Entity Framework Core
Microsoft’s cross-platform data access framework for .NET
Building your first app that uses EF Core
Controlling database creation and
Course schema changes
Overview Adding more relationships
Interacting with your EF Core data model
Review
Interacting with related data
Working with views, stored procedures
and raw SQL
Using EF Core in an ASP.NET Core app
Using EF Core in your tests
Module What is EF Core?
Overview
Setting up a new solution
Adding EF Core APIs
Creating a data model and DB connection
Sneak peek at writing and reading data in
the application
What is Entity Framework Core?
Microsoft’s Object Relational Mapper
EF
EF Core 5
EF Core 3 2020
2019
EF Core 2
Core 2017
2016 EF6 ~100 million downloads
EF – EF6 EF Core ~135 million downloads
2008 – 2013 *Sept 2020
Entity Framework Core
Microsoft’s official data access technology
for .NET development
135 million downloads (adding every version)
~5 million of EF Core 3.1
Windows, macOS & Linux
EF Core Is an ORM
Object
Relational
Mapper
High Level ORM Benefits
Developer productivity
Coding consistency
EF Maps Differently Than Most ORMs
Typical ORM
docs.microsoft.com/en-us/ef/core/platforms/
Installing .NET Core
dot.net
dotnet.microsoft.com/download
Setting Up to Follow Along
Model view generated from EF Core Power Tools extension for VS2019
I’ll demo using this tool later in the course
Creating the Data Model with EF Core
Specifying the Data Provider
and Connection String
No More Database Magic
You must specify
data provider & connection string
What About My Database?
Use EF Core
Database run-time Create DB
already NO creation directly
exists
Need to NO
control Good for limited scenarios
creation
YES
YES
Let EF Core Use EF Core
reverse-engineer Create SQL
design-time
classes & context Script
“Migrations”
from DB* feature OR
Create DB
directly
A Sneak Peek at Writing and Reading Data
The following code will be a
simple hack so you can see
EF Core do its job before
learning more.
Review Learned what EF Core is for
Created a data model with EF Core
Review
Learned about the EF Core APIs and their
storage provider APIs
Witnessed some basic interaction to insert
and query data
Resources
Entity Framework Core on GitHub github.com/dotnet/efcore
Julie Lerman
MOST TRUSTED AUTHORITY ON ENTITY FRAMEWORK
@julielerman thedatafarm.com