Skip to content

Entity Framework Core

A .NET library that maps C# objects to database tables so you can query and save data with code.dotnet/efcore

Stars
14.8k
Forks
3.5k
Licence
MIT
Language
C#
Last update
4 days ago
Type
Library

What it is

EF Core is an object-relational mapper for .NET. It lets developers work with database data as C# objects and LINQ queries instead of writing raw SQL for most tasks. It also tracks changes to objects, saves updates, and supports schema migrations. The README says it works with SQL Server, SQLite, PostgreSQL, MySQL, Cosmos DB and others through provider packages.

  • Insert, query, update and delete blog records in a .NET app using the example pattern in the README
  • Connect a .NET web app to SQL Server or Azure SQL by installing the matching provider package
  • Use Microsoft.Data.Sqlite on its own as a lightweight ADO.NET driver for a local SQLite file
  • Track changes to entity objects and save them to the database in one call

Great for

  • C# developers building .NET applications that use a relational or document database
  • Teams who prefer LINQ queries over hand-written SQL for everyday data access
  • Developers using SQLite in a .NET app through Microsoft.Data.Sqlite
  • Projects that need schema migrations managed from code

Not ideal for

  • Non-.NET developers, since the library is built for .NET and C#
  • People who want a no-code tool or a hosted database service, since this is a code library
  • Projects that need full control over hand-tuned SQL, where a mapper may add abstraction you do not want
Step-by-step guide: how to use Entity Framework CoreInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: .NET SDK (version not specified in the README)

    Install the SQL Server provider

    dotnet add package Microsoft.EntityFrameworkCore.SqlServer

    Install the SQLite provider

    dotnet add package Microsoft.EntityFrameworkCore.Sqlite

    Install Microsoft.Data.Sqlite

    dotnet add package Microsoft.Data.Sqlite
  2. 2

    Run it

    • Create a project and install the provider package for your database
    • Define a DbContext and model classes (see the getting started guide linked in the README)
    • Create the database, then run the basic usage code to add, query, update and delete a record
  3. 3

    Get the most out of it

    • Use the provider list in the docs to find support for databases not named in the README
    • Read the getting started tutorial for configuring DbContext and defining the model
    • Use the --version option to try a preview release when you need a feature not yet in stable
    • Consider the daily builds if you want the latest code and are willing to accept more change

Downloads

Strengths

  • Backed by Microsoft and licensed under MIT, a permissive open-source license
  • Supports many databases through a provider plugin model
  • Familiar LINQ syntax for querying data in C#

Trade-offs

  • Only usable from .NET; not relevant outside that ecosystem
  • The README notes daily builds carry the newest features while official releases lag behind, so you may need to choose between stability and new features
  • Database-specific behavior depends on which provider package you install, so features can vary by database

How it compares

ProjectStarsTypeLevelUpdatedBest for
efcore (this)14.8kLibraryintermediate4 days agoC# developers building .NET applications that use a relational or document database
typeorm36.7kLibraryintermediate8 days agoNode.js or TypeScript developers building apps backed by a relational database
duckdb42.7kLibrarybeginner4 days agoAnalysts who want to run SQL directly on CSV, Parquet, or JSON files
turso25.1kLibraryintermediate4 days agoDevelopers who want an embedded SQLite-compatible database in a Rust, JavaScript, Python, Java, Go, or .NET project
lowdb22.6kLibrarybeginner7 months agoNode.js developers building small tools or prototypes that need simple persistent storage
bolt14.6kLibraryintermediate8.7 years agoGo developers who need a small embedded store inside an application

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.