Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Core
  3. SmartSql

SmartSql

Apache-2.0C#v4.1.68

A high-performance .NET data access layer inspired by MyBatis, offering XML-managed SQL, caching, read/write splitting, and dynamic repositories.

Visit WebsiteGitHubGitHub
1.1k stars225 forks0 contributors

What is SmartSql?

SmartSql is a .NET data access framework inspired by MyBatis that gives developers full control over SQL through XML configuration. It solves the problem of complex, hard-to-optimize LINQ queries by allowing direct SQL management while providing features like caching, read/write splitting, and dynamic repositories to improve performance and maintainability.

Target Audience

.NET developers building data-intensive applications who need fine-grained SQL control, high performance, and scalable data access patterns without the overhead of traditional ORMs.

Value Proposition

Developers choose SmartSql for its balance of SQL control and developer productivity, offering MyBatis-like flexibility in the .NET ecosystem with built-in caching, monitoring, and repository automation that outperforms raw ADO.NET approaches.

Overview

SmartSql = MyBatis in C# + .NET Core+ Cache(Memory | Redis) + R/W Splitting + PropertyChangedTrack +Dynamic Repository + InvokeSync + Diagnostics

Use Cases

Best For

  • Microservices requiring optimized SQL performance and monitoring
  • Applications needing complex read/write splitting configurations
  • Projects migrating from Java MyBatis to .NET
  • High-throughput systems where caching strategies are critical
  • Teams wanting XML-based SQL management over LINQ
  • Enterprise applications requiring declarative transactions and bulk operations

Not Ideal For

  • Projects using Entity Framework Core for its integrated migrations and LINQ-based rapid development
  • Teams that prefer keeping SQL inline with C# code using micro-ORMs like Dapper
  • Applications with straightforward data access patterns where full SQL control and XML configuration add unnecessary overhead
  • Developers new to XML-based SQL management who prioritize quick setup over fine-grained optimization

Pros & Cons

Pros

Granular SQL Control

Centralizes SQL in XML files, allowing developers to write and optimize queries directly without LINQ abstraction layers, as highlighted in the philosophy section for absolute control.

Dynamic Repository Automation

Reduces boilerplate code by automatically implementing repository interfaces via naming conventions and integrating seamlessly with IoC containers, as shown in the DyRepository examples.

Built-in Caching Strategies

Includes memory caches (LRU, FIFO) and Redis integration with configurable policies, improving performance for high-throughput systems, as detailed in the caching section.

Production-Ready Scalability

Offers read/write splitting, ID generation (Snowflake), and SkyWalking monitoring for diagnostics, making it suitable for microservices and enterprise environments.

Cons

XML Configuration Overhead

Requires managing SQL in external XML files, which can be cumbersome for refactoring and less intuitive for developers accustomed to code-first or inline SQL approaches.

Complex Initial Setup

Involves multiple NuGet packages and tools like SmartCode for best practices, adding a non-trivial configuration burden that may slow down project onboarding.

Limited Ecosystem Maturity

Has a smaller community and fewer third-party integrations compared to mainstream ORMs like Entity Framework, potentially making troubleshooting and resource finding more difficult.

Open Source Alternative To

SmartSql is an open-source alternative to the following products:

E
Entity Framework

Entity Framework is an object-relational mapper (ORM) for .NET that enables developers to work with databases using .NET objects.

D
Dapper

Dapper is a micro-ORM (Object Relational Mapper) for .NET that provides high-performance data access with minimal overhead compared to full ORMs.

Frequently Asked Questions

Quick Stats

Stars1,128
Forks225
Contributors0
Open Issues24
Last commit1 day ago
CreatedSince 2017

Tags

#orm#database#high-performance#caching#redis#monitoring#dotnet-core#data-access-layer#zookeeper#cross-platform#cache#orm-alternative#repository-pattern#distributed-computing#sql

Built With

.
.NET Core
C
C++

Links & Resources

Website

Included in

Core21.2k
Auto-fetched 3 hours ago

Related Projects

Entity Framework CoreEntity Framework Core

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.

Stars14,637
Forks3,377
Last commit3 hours ago
FreeSqlFreeSql

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

Stars4,379
Forks904
Last commit2 days ago
EFCore.BulkExtensionsEFCore.BulkExtensions

Entity Framework EF Core efcore Bulk Batch Extensions with BulkCopy in .Net for Insert Update Delete Read (CRUD), Truncate and SaveChanges operations on SQL Server, PostgreSQL, MySQL, SQLite, Oracle

Stars3,980
Forks630
Last commit1 month ago
querybuilderquerybuilder

SQL query builder, written in c#, helps you build complex queries easily, supports SqlServer, MySql, PostgreSql, Oracle, Sqlite and Firebird

Stars3,352
Forks524
Last commit18 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub