A powerful, expressive SQL query builder for C# that supports multiple databases with a unified API.
SqlKata is a SQL query builder for C# that provides an expressive, fluent API to construct complex SQL queries programmatically. It solves the problem of writing raw SQL strings by offering a secure, database-agnostic way to build queries for multiple database systems, reducing errors and improving code maintainability.
C# and .NET developers who need to interact with databases and want a lightweight, flexible alternative to full ORMs, especially those working with multiple database vendors or requiring dynamic query generation.
Developers choose SqlKata for its clean, SQL-like syntax, support for six major databases with a single API, and seamless integration with Dapper for execution, offering a balance between raw SQL control and ORM-like convenience.
SQL query builder, written in c#, helps you build complex queries easily, supports SqlServer, MySql, PostgreSql, Oracle, Sqlite and Firebird
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers a clean, SQL-like syntax that makes queries readable and maintainable, as shown in examples with conditional logic and joins that mimic raw SQL structure.
Supports six major databases (SQL Server, PostgreSQL, etc.) with a unified API, enabling code portability and reducing vendor lock-in, as highlighted in the key features.
Handles nested conditions, subqueries, pagination, and joins programmatically, allowing dynamic query construction without string concatenation, demonstrated in the quick examples.
The optional SqlKata.Execution package integrates with Dapper for efficient query execution, combining the builder's expressiveness with Dapper's performance, as noted in the installation section.
Only supports six major databases and explicitly states it does not accept new compilers, making it unsuitable for projects with niche or NoSQL databases, as admitted in the FAQ.
Core package only generates SQL strings; executing queries requires installing SqlKata.Execution and Dapper separately, adding setup complexity and potential versioning issues.
Lacks ORM capabilities like entity mapping, change tracking, or migrations, which may necessitate additional tools or manual coding for full data access layers.