talira

.NET ORM with CodeFirst, DbFirst and support for many databases, including AOT builds

open sourceMITfree

FreeSql is an object-relational mapper (O/RM) for .NET Core 2.1+, .NET Framework 4.0+ and Xamarin that also supports AOT publishing. It does CodeFirst migrations and DbFirst entity import, advanced type mapping such as PostgreSQL arrays, expression functions, one-to-many and many-to-many navigation properties with include and lazy loading, read/write separation, table and database splitting, global filters and optimistic and pessimistic locking. It supports MySQL, SQL Server, PostgreSQL, Oracle, SQLite, Firebird, ClickHouse, DuckDB, TDengine, QuestDB and Access, and several Chinese databases (Dameng, KingbaseES and others). It's a member project of the .NET Core Community, and its own documentation site is mostly in Chinese.

Problems it solves

  • use one ORM for MySQL, PostgreSQL and SQL Server in a .NET app
  • split a large table across several tables or databases in .NET
  • publish a .NET app with AOT and still use an ORM

Features

  • CodeFirst migrations and DbFirst entity import
  • navigation properties with include and lazy loading
  • read/write separation and table or database splitting
  • global filters and optimistic and pessimistic locking
  • repository and unit of work through FreeSql.DbContext
  • AOT publishing

Alternatives

The same job

These do what FreeSql does.

  1. SqlSugar .NET ORM for many databases, including China's domestic ones such as Dameng and KingbaseES
  2. Entity Framework Core A lightweight, extensible, open source and cross-platform version of Entity Framework
  3. Dapper A simple, fast object mapper for .NET
  4. Npgsql Entity Framework Core provider The open source Entity Framework Core provider for PostgreSQL
  5. Entity Framework 6 A tried and tested object-relational mapper for .NET
  6. SQLite-net A small SQLite client and ORM for .NET

Compare FreeSql with the top 3