FreeSql is an object-relational mapper for .NET applications. It provides APIs for querying and modifying relational databases while mapping database records to C# objects.
The ORM supports .NET Core, .NET Framework, Xamarin, and ahead-of-time compilation scenarios. It offers several development models, including direct FreeSql access, DbContext with repositories and units of work, and a simplified BaseEntity approach.
This is free and open source software.
Key Features
- Supports Code First schema creation and database migrations.
- Generates entity classes from existing databases using DbFirst tools.
- Provides strongly typed queries using LINQ expression trees.
- Handles one-to-one, one-to-many, and many-to-many relationships.
- Offers eager loading, cascading operations, and lazy loading.
- Supports repositories, units of work, transactions, and dependency injection.
- Provides read/write separation, table partitioning, database sharding, and global filters.
- Supports optimistic and pessimistic locking.
- Works with MySQL, MariaDB, PostgreSQL, SQL Server, Oracle, SQLite, Firebird, ClickHouse, DuckDB, TDengine, QuestDB, Microsoft Access, and other databases.
- Allows custom data-type mappings and expression-function translation.
Website: github.com/dotnetcore/FreeSql
Support:
Developer: YeXiangQin
License: MIT License
FreeSql is written in C#. Learn C# with our recommended free books and free tutorials.
Related Software
| C# Object-Relational Mapping Software | |
|---|---|
| Entity Framework Core | Modern object-database mapper for .NET. |
| Dapper | Simple object mapper for .NET |
| NHibernate | Mature, open source object-relational mapper for .NET |
| LINQ to DB | LINQ database access library |
| SqlSugar | Fluent API for querying and modifying databases |
| FreeSql | Povides APIs for querying and modifying relational databases |
| RepoDB | Hybrid ORM library for .NET |
| Venflow | Fast and lightweight ORM for PostgreSQL |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.