# dotnetcore/FreeSql

.NET aot orm, VB.NET/C# orm, Mysql/PostgreSQL/SqlServer/Oracle orm, Sqlite/Firebird/Clickhouse/DuckDB orm, 达梦/金仓/虚谷/翰高/高斯 orm, 神通 orm, 南大通用 orm, 国产 orm, TDengine orm, QuestDB orm, MsAccess orm.

Repository: https://github.com/dotnetcore/FreeSql
Canonical: https://ross.abutalabs.com/products/freesql
Homepage: https://freesql.net
Language: C#
License: MIT
License Family: permissive
Topics: orm, codefirst, mysql, sqlite, sqlserver, postgresql, odbc, dameng, kingbase, access, shentongdata, firebird, hacktoberfest, highgo, oracle, gbase, clickhouse, questdb, xugu, duckdb
Last push: 2026-07-31T17:52:16+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 95, longevity 100
- inputs: {"age_days": 2815, "days_push": 33, "days_rel": 33, "gap_med": 18.5, "n_releases_24m": 25}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4406, forks 908 (observed 2026-08-28T04:08:48.412278+00:00)

## What it is
FreeSql is a powerful Object-Relational Mapping (ORM) library for .NET, supporting .NET Core 2.1+, .NET Framework 4.0+, Xamarin, and AOT compilation. It provides CodeFirst migrations, DbFirst entity generation, rich type mapping, navigation properties, and read/write separation across a very wide range of databases including MySQL, PostgreSQL, SQL Server, Oracle, SQLite, ClickHouse, DuckDB, and many Chinese domestic databases.

## Use cases
- map C# entities to database tables in a .NET application
- perform CodeFirst database migrations from entity classes
- generate entity classes from an existing database schema
- query databases with LINQ-style expression functions
- set up read/write separation and table/database splitting
- connect to Chinese domestic databases like Dameng, Kingbase, or GBase from .NET
- use an ORM in AOT-compiled .NET applications

## When to choose
- you are building a .NET application that needs database access across many database engines
- you need AOT-compatible ORM support
- you require CodeFirst migrations plus DbFirst entity generation in one tool
- you work with Chinese domestic databases (Dameng, Kingbase, HighGo, GBase, etc.)

## When to avoid
- your project is not on the .NET platform
- you prefer Microsoft's standard EF Core ecosystem and tooling
- you need a micro-ORM with minimal features and tiny footprint
- your team has no capacity to evaluate a community-maintained ORM over mainstream options

## Facets
- artifact type: library
- maturity: active
- function: orm, database, database-driver
- domain: databases, backend, developer-tools
- platform: dotnet, cross-platform
- tags: codefirst, dbfirst, mysql, postgresql, sqlserver, oracle, sqlite, clickhouse, duckdb, aot, read-write-separation, sharding, chinese-databases

## Member repositories
- dotnetcore/FreeSql (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:48.412278+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:21:05.279377+00:00, confidence not recorded.
  - readme: https://github.com/dotnetcore/FreeSql (fetched 2026-08-28T04:08:48.412278+00:00, sha bd7115f76e2f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
