Entity Framework Core maps .NET objects to relational databases, supports LINQ queries, change tracking, updates, and schema migrations via provider packages.
Overview
Entity Framework Core (EF Core) is an object-database mapper for .NET applications. It lets you define a model, query with LINQ, track changes, save updates, and evolve schemas through migrations.
Database support includes SQL Server, Azure SQL, SQLite, Azure Cosmos DB, MariaDB, MySQL, PostgreSQL, and additional engines through provider plugins. Packages install from NuGet; you add the provider that matches your database.
Documentation covers modeling, querying with tracking and no-tracking modes, saving data with transactions and concurrency, migrations in team environments, reverse engineering from existing databases, logging, interceptors, testing strategies, and performance tuning. Design-time tools work from Visual Studio, the .NET CLI, and MSBuild.
The same repository also ships Microsoft.Data.Sqlite, a lightweight ADO.NET provider for SQLite that the EF Core SQLite provider builds on and that can be used alone.
Key features
- LINQ queries against relational stores
- Change tracking and save pipelines
- Schema migrations
- Multiple database providers
- Reverse engineering from databases
- Interceptors and diagnostics
- In-memory provider for testing
- Cosmos DB and NoSQL provider options
Use cases
- ASP.NET Core apps with SQL Server
- Console tools using SQLite
- Multi-tenant data access layers
- Schema evolution across environments