Entity Framework Core vs Dapper
Both get data from a database into C# objects. EF Core does more for you; Dapper gets out of your way.
Which should you choose?
Entity Framework Core
Choose it if you want migrations, change tracking and LINQ, and most of your queries are ordinary CRUD.
Dapper
Choose it if you want to write and control every SQL query yourself, or you need the lowest overhead on a hot path.
Side by side
| Entity Framework Core | Dapper | |
|---|---|---|
| Price | Free | Free |
| Level | — | — |
| Platforms | NuGet | NuGet |
| Setup | Add the provider package, define a DbContext, run migrations | Add the package, write SQL |
| Best for | The default data layer for most .NET apps | Hand-written SQL without boilerplate |
| Strengths |
|
|
| Drawbacks |
|
|
| Website | Visit ↗ | Visit ↗ |
Prices change; figures are approximate and were last checked on the date shown on each tool's page.