Entity Framework Core documentation
The official EF Core docs on Microsoft Learn: modelling entities and relationships, migrations, querying with LINQ, saving data, performance and database providers such as SQL Server and PostgreSQL. Free, current for EF Core 10, with a dedicated performance section every .NET developer should read.
10.0.12
NuGet · Oct 2026
14.8k (dotnet/efcore)
GitHub · Oct 2026
MIT
GitHub · Oct 2026
Guide
Web Development
Microsoft
A week for the essentials, then reference
Intermediate
Free
What EF Core is
Entity Framework Core is Microsoft's object-relational mapper for .NET. You describe your data as C# classes, query it with LINQ, and EF Core translates those queries into SQL, tracks changes and writes them back. It supports SQL Server and Azure SQL, SQLite, PostgreSQL through the Npgsql provider, Cosmos DB and others. EF Core versions follow .NET, so EF Core 10 ships alongside .NET 10.
What the documentation covers
- Getting started: a short tutorial that builds a console app with a model, a database and basic queries.
- Creating a model: entity types, keys, relationships (one-to-many, many-to-many, owned types), indexes, value conversions, concurrency tokens and the Fluent API.
- Managing schemas: migrations with the
dotnet eftool, idempotent SQL scripts and migration bundles for deployment pipelines. - Querying data: LINQ translation, loading related data with Include, tracking versus no-tracking queries, split queries, raw SQL and global query filters.
- Saving data: change tracking, transactions, concurrency conflicts and the bulk ExecuteUpdate and ExecuteDelete methods added in EF Core 7.
- Performance: a whole section on efficient querying, efficient updating, modelling for performance and diagnosing slow queries with logging.
Is it worth your time?
Yes, if you work in .NET. Most .NET job ads mention EF Core, and most slow .NET apps are slow because of how they use it. The performance section explains the N+1 problem, projections, tracking costs and the cartesian explosion that comes from including several collections, written by the team that builds EF Core.
How to learn from it
Do the getting started tutorial, then read Creating a model and Managing schemas while you build a small project. Before you put anything in production, read the Performance section in full. Turn on SQL logging in Development and compare what you wrote in LINQ with what EF Core sent to the database.
Prerequisites
Comfortable C#, including LINQ and async/await, and basic SQL: SELECT, JOIN, GROUP BY, keys and indexes. EF Core writes SQL for you, but you still need to read it.
Free or paid?
Free. EF Core and its docs are open source under the MIT licence.
What you can do after it
Model a relational database in C#, evolve it safely with migrations, write queries that stay fast as data grows, and explain what SQL your code produces.
Common questions
EF Core or Dapper? Many teams use EF Core for most work and Dapper or raw SQL for a few heavy reports. Measure before switching.
Is the in-memory provider good for tests? The docs advise against it for testing code that relies on real database behaviour; use a real database, for example in a container.
Ready to start?
Opens on Microsoft in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.