C# ORM

Open-source C# projects categorized as ORM

Top 23 C# ORM Projects

  • GitHub repo Entity Framework

    EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.

    Project mention: How is EF different from embedding sql? | reddit.com/r/dotnetcore | 2021-06-10

    https://github.com/dotnet/efcore/issues/795 the number of duplicate issues assigned to it suggests it is quite a popular request.

  • GitHub repo FreeSql

    🦄 .NET orm, Mysql orm, Postgresql orm, SqlServer orm, Oracle orm, Sqlite orm, Firebird orm, 达梦 orm, 人大金仓 orm, 神通 orm, 翰高 orm, 华为GaussDB orm, MsAccess orm. (by dotnetcore)

  • GitHub repo FluentMigrator

    Fluent migrations framework for .NET

  • GitHub repo LINQ to DB

    Linq to database provider.

    Project mention: Is there a widely used hibernate-like ORM framework for .net core? | reddit.com/r/dotnet | 2021-04-29
  • GitHub repo Pomelo.EntityFrameworkCore.MySql

    Entity Framework Core provider for MySQL and MariaDB built on top of MySqlConnector

    Project mention: Question about C# and MySql | reddit.com/r/csharp | 2021-02-18

    For MySQL and friends you'll need the Pomelo data provider from https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql . Turns out there's an example of using the MySQL provider about halfway down that shows how to, but it is missing the '-o Model' parameter that you'd use to get your database model into a folder called Model.

  • GitHub repo NHibernate

    NHibernate Object Relational Mapper

    Project mention: Is there a widely used hibernate-like ORM framework for .net core? | reddit.com/r/dotnet | 2021-04-29

    NHibernate works with .NET core: https://github.com/nhibernate/nhibernate-core

  • GitHub repo PetaPoco

    Official PetaPoco, A tiny ORM-ish thing for your POCO's

    Project mention: am i going mad? | reddit.com/r/csharp | 2021-03-30
  • GitHub repo Massive

    A small, happy, dynamic MicroORM for .NET that will love you forever.

  • GitHub repo Fluent NHibernate

    Fluent NHibernate!

  • GitHub repo ServiceStack.OrmLite

    Fast, Simple, Typed ORM for .NET

  • GitHub repo Dapper Extensions

    Dapper Extensions is a small library that complements Dapper by adding basic CRUD operations (Get, Insert, Update, Delete) for your POCOs. For more advanced querying scenarios, Dapper Extensions provides a predicate system. The goal of this library is to keep your POCOs pure by not requiring any attributes or base class inheritance.

  • GitHub repo RepoDb

    A hybrid ORM library for .NET. (by mikependon)

  • GitHub repo Entity Framework 6

    This is the codebase for Entity Framework 6 (previously maintained at https://entityframework.codeplex.com). Entity Framework Core is maintained at https://github.com/dotnet/efcore.

    Project mention: Ask HN: What tangible benefits did you get from spending time on HN? | news.ycombinator.com | 2021-03-06

    Every so often, posts from Bruce Dawson's blog get posted here - one such post was about using Event Tracing for Windows to diagnose an issue with an NTFS lock being held causing 63 cores to idle while 1 does all the work.

    https://randomascii.wordpress.com/2019/10/20/63-cores-blocke...

    A few months later, some other people in my team were struggling to diagnose an issue in production where a legacy webapp was struggling to scale up and fully use all 64 cores of the server we needed it to run on. I stepped in to help and remembered that post I'd seen on HN. We used ETW (through Windows Performance Recorder and Windows Performance Analyzer) to profile our app and I looked into the Wait Analysis. Turns out that Entity Framework 6 uses a ReaderWriterLockSlim to guard a cache, and that particular lock performs extremely poorly under heavy contention. Heavy in our case meant that for a single page build of one of this app's "hot path" pages, this lock would be taken a few hundred thousand times. We weren't the first to discover this:

    https://github.com/dotnet/ef6/issues/1500

    What some other people in my team were struggling with for about two weeks was resolved in a single day thanks to me goofing off and reading HN. (We ultimately used a fork of EF6 that didn't suffer from this issue to solve our problem)

  • GitHub repo LINQKit

    LINQKit is a free set of extensions for LINQ to SQL and Entity Framework power users.

    Project mention: Build dynamic Linq filters (aka. where() predicates) | reddit.com/r/dotnet | 2021-06-04

    Nice! At work we do something similar, but we use the predicate builder of linqkit: https://github.com/scottksmith95/LINQKit

  • GitHub repo SmartSql

    SmartSql = MyBatis in C# + .NET Core+ Cache(Memory | Redis) + R/W Splitting + PropertyChangedTrack +Dynamic Repository + InvokeSync + Diagnostics

  • GitHub repo NPoco

    Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco

  • GitHub repo MicroOrm.Dapper.Repositories

    CRUD for Dapper

  • GitHub repo LINQ to Twitter

    LINQ Provider for the Twitter API (C# Twitter Library)

  • GitHub repo Dapper.FastCRUD

    The fastest micro-orm extension for Dapper

    Project mention: 100 stars in Github - Dapper Query Builder using String Interpolation | reddit.com/r/dotnet | 2021-04-08

    Regarding CUD (inserts/updates/deletes), I think Dommel works similarly to Dapper.FastCRUD and Dapper.SimpleCRUD, and those two look a little more mature in my opinion (not sure, but I really have the impression that Dommel is targeted at people who like this LINQ intellisense).

  • GitHub repo Npoi.Mapper

    Use this tool to import or export data with Excel file. The tool is a convention based mapper between strong typed object and Excel data via NPOI.

    Project mention: Having trouble with updating a NuGet package | reddit.com/r/dotnet | 2021-05-10

    I went to look at Npoi.Mapper's GitHub issues, and this error is not mentioned there. Furthermore, I took a look at Npoi.Mapper's csproj file. There it clearly states .

  • GitHub repo Tortuga Chain

    Micro ORM for .Net

    Project mention: EF/Dapper vs Custom-developed ORM | reddit.com/r/dotnet | 2021-05-07
  • GitHub repo BL Toolkit

    Business Logic Toolkit for .NET

  • GitHub repo ExcelMapper

    Map POCO objects to Excel files

    Project mention: Can anyone recommend a free library for creating an excel file? | reddit.com/r/csharp | 2021-04-15

    Not sure of the limitations but this library has saved me a bunch of time at work both writing and reading excel. https://github.com/mganss/ExcelMapper

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2021-06-10.

Index

What are some of the best open-source ORM projects in C#? This list will help you:

Project Stars
1 Entity Framework 10,284
2 FreeSql 2,832
3 FluentMigrator 2,527
4 LINQ to DB 2,066
5 Pomelo.EntityFrameworkCore.MySql 1,967
6 NHibernate 1,861
7 PetaPoco 1,813
8 Massive 1,765
9 Fluent NHibernate 1,607
10 ServiceStack.OrmLite 1,500
11 Dapper Extensions 1,490
12 RepoDb 1,279
13 Entity Framework 6 1,239
14 LINQKit 967
15 SmartSql 780
16 NPoco 772
17 MicroOrm.Dapper.Repositories 451
18 LINQ to Twitter 413
19 Dapper.FastCRUD 369
20 Npoi.Mapper 367
21 Tortuga Chain 308
22 BL Toolkit 284
23 ExcelMapper 235