A fast, type-safe LINQ database access library that sits between micro-ORMs and full ORMs, offering SQL-like control with LINQ expressions.
LINQ to DB is a .NET library that provides fast, type-safe database access using LINQ queries. It translates LINQ expressions into SQL, offering a lightweight layer between your code and the database. It solves the problem of writing raw SQL with string concatenation while avoiding the overhead and complexity of full-fledged ORMs.
.NET developers who need high-performance database access with LINQ, especially those transitioning from micro-ORMs like Dapper or seeking an alternative to Entity Framework. It's also suitable for F# developers looking for type-safe database querying.
Developers choose LINQ to DB for its balance of speed, control, and type safety. It provides more abstraction than micro-ORMs without the bloat of full ORMs, and its queries are compiler-checked, reducing runtime errors. The library is optimized for performance and supports advanced SQL features like bulk operations and window functions.
Linq to database provider.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses LINQ expressions instead of magic strings, enabling C# compiler validation and easy refactoring, as highlighted in the architecture description.
Marketed as the fastest LINQ database access library, with features like bulk copy/insert for efficient large data transfers, emphasizing speed over full ORM bloat.
Supports complex SQL scenarios such as CTEs, window functions, and a Merge API, providing fine-grained control without sacrificing LINQ convenience.
Allows attribute-based, fluent, or inferred mapping of POCOs, catering to different project needs without forcing a single approach, as detailed in the configuration sections.
Requires manual management of entity states for updates, increasing boilerplate code compared to ORMs like Entity Framework that handle this automatically.
Mapping POCOs to database tables demands explicit setup through attributes or fluent configuration, which can be time-consuming for large domain models.
Developers must understand how LINQ queries translate to SQL to avoid performance pitfalls, which might be challenging for teams unfamiliar with database internals.
LINQ to DB is an open-source alternative to the following products: