# FreeSql

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

Source: https://talira.ai/catalog/freesql-04nn0ey7
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / databases / orm](https://talira.ai/categories/libraries/databases/orm), [languages / dotnet](https://talira.ai/categories/languages/dotnet)
- Licence: MIT[^1]
- Pricing: Free and open source[^1][^2]
- Pricing notes: Free and open source (MIT); the author takes donations.
- Free tier: yes[^1][^2]
- Backed by: [Ye (2881099)](https://talira.ai/orgs/ye-2881099.md), [.NET Core Community](https://talira.ai/orgs/dotnetcore.md)

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.

## Links

- Website: https://freesql.net/
- GitHub: https://github.com/dotnetcore/FreeSql
- Docs: https://github.com/dotnetcore/FreeSql/wiki/Getting-Started

## 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

## Trust

Overall: 0.64 out of 1.
Signals: maintenance 0.92, adoption 0.73, momentum 0.51, community 0.77, backing 0.30, extensibility 0.00.

- last commit 2 days ago
- 48 commits in the last 90 days
- latest release v3.5.312 8 days ago
- 4.4k GitHub stars
- 81 contributors
- backed by Ye (2881099) and .NET Core Community

## Alternatives

- [SqlSugar](https://talira.ai/catalog/sqlsugar-w25wp5p4.md): .NET ORM for many databases, including China's domestic ones such as Dameng and KingbaseES
- [Entity Framework Core](https://talira.ai/catalog/entity-framework-core-g9v76f6s.md): A lightweight, extensible, open source and cross-platform version of Entity Framework
- [Dapper](https://talira.ai/catalog/dapper-jfex180x.md): A simple, fast object mapper for .NET
- [Npgsql Entity Framework Core provider](https://talira.ai/catalog/npgsql-entity-framework-core-provider-dpq7t9ey.md): The open source Entity Framework Core provider for PostgreSQL
- [Entity Framework 6](https://talira.ai/catalog/entity-framework-6-45218x7z.md): A tried and tested object-relational mapper for .NET
- [SQLite-net](https://talira.ai/catalog/sqlite-net-avpe871v.md): A small SQLite client and ORM for .NET

## Sources

[^1]: https://github.com/dotnetcore/FreeSql/blob/master/LICENSE (checked 29 Nov 2026)
[^2]: https://freesql.net/ (checked 29 Nov 2026)
