C# ORM Libraries

C# ORM Libraries

C# ORM libraries provide deep integration with the .NET ecosystem. Entity Framework Core is the official ORM developed by Microsoft, Dapper offers high-performance lightweight implementation, and NHibernate provides rich features as the .NET port of Hibernate. Integration with LINQ enables type-safe and expressive queries.

GitHub Star Comparison

C# ORM Libraries GitHub Star Comparison
NoNameGitHub StarsDescriptionTrendLicenseTypeOfficial Site
1Dapper⭐ 18.0kDapper is a lightweight and high-performance micro-ORM (Object-Relational Mapping) library for .NET, developed as a "simple object mapper for .NET". Actually used and proven in Stack Overflow's large-scale traffic site, it's a library with demonstrated performance. While allowing raw SQL writing, it provides automatic mapping with C# objects, achieving overwhelmingly faster execution speed and lower memory usage compared to Entity Framework and NHibernate, making it a practical data access solution focused on utility.stableApache-2.0LibraryOfficial
2Entity Framework Core⭐ 14.2kEntity Framework Core (EF Core) is developed as "a lightweight, extensible, and cross-platform Object-Relational Mapping (ORM) framework for .NET" and serves as Microsoft's official data access technology. Through complete integration with .NET 5/6/7/8, it provides intuitive query writing based on LINQ, automatic schema generation through Code First approach, and comprehensive migration functionality. Supporting major databases including SQL Server, MySQL, PostgreSQL, SQLite, it has established itself as a comprehensive data persistence solution for modern .NET development.stableMITLibraryOfficial
3NHibernate⭐ 2.2kNHibernate is a mature, highly flexible enterprise ORM for .NET. Developed as a C# port of Java Hibernate, it's an open-source OR/M framework with over 15 years of proven track record. It provides precise SQL control, multi-database support, enterprise-grade caching, and rich mapping methodologies, optimized for building complex enterprise systems. Through the Data Mapper pattern, it achieves separation between domain models and database schemas, delivering exceptional flexibility for legacy system integration and complex business logic implementation.stableLGPL-2.1LibraryOfficial
4PetaPoco⭐ 2.1kPetaPoco is "a lightweight and fast micro ORM" developed as a simple data access library for .NET consisting of a single file. In contrast to heavy ORMs like Entity Framework or NHibernate, it features a design that prioritizes simplicity and performance. While leveraging SQL knowledge to greatly reduce manual coding, it provides safe and efficient database operations without limiting the full power of SQL.stableApache-2.0LibraryOfficial
5Massive⭐ 1.8kMassive is a simple, dynamic .NET data access library. It achieves ultimate lightweight design with single-file implementation and zero dependencies, making it optimized for prototyping and small projects. With dynamic typing and simple API, it's suitable for rapid development and REPL environment usage.stableMITLibrary-
6Entity Framework Core-Entity Framework Core (EF Core) is a lightweight, extensible, cross-platform ORM for .NET. Supporting both Code First and Database First approaches, it supports SQL Server, Azure SQL, SQLite, PostgreSQL, MySQL, and more, providing powerful query capabilities through LINQ integration.stableMITLibraryOfficial
7LINQ to DB-LINQ to DB is a lightweight, SQL-first .NET ORM library. It achieves high performance through direct SQL translation of LINQ queries and supports diverse database providers. It is chosen by developers seeking more direct database control and performance as an alternative to Entity Framework.stableMITLibrary-