SmartSql 2.2.0-preview

This is a prerelease version of SmartSql.
There is a newer version of this package available.
See the version list below for details.
dotnet add package SmartSql --version 2.2.0-preview
                    
NuGet\Install-Package SmartSql -Version 2.2.0-preview
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SmartSql" Version="2.2.0-preview" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SmartSql" Version="2.2.0-preview" />
                    
Directory.Packages.props
<PackageReference Include="SmartSql" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SmartSql --version 2.2.0-preview
                    
#r "nuget: SmartSql, 2.2.0-preview"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SmartSql@2.2.0-preview
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SmartSql&version=2.2.0-preview&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=SmartSql&version=2.2.0-preview&prerelease
                    
Install as a Cake Tool

SmartSql - Documentation

0. Why ?

  • Embrace the cross platform. DotNet Core, it's time!
  • Based on Dapper, no more wheels are repeated. Dapper performance you know!

1. So SmartSql

  • TargetFramework: .NETStandard,Version=v1.3
  • SmartSql = Dapper + MyBatis + Cache(Memory | Redis) + ZooKeeper + R/W Splitting + ......

2. Feature

  • 1 ORM
    • 1.1 Sync
    • 1.2 Async
  • 2 XmlConfig & XmlStatement → Sql
    • 2.1 SmartSqlMapConfig & SmartSqlMap √ (Yes, you guessed that, like MyBatis, you separated SQL from the XML configuration.)
    • 2.2 Config Hot Update →ConfigWatcher & Reload (Configuration file hot update: when you need to change Sql, modify the SqlMap configuration file directly and save it.)
  • 3 Read-write separation
    • 3.1 Read-write separation
    • 3.2 Election of the read database by weight
  • 4 Logging √
    • 4.1 Base on Microsoft.Extensions.Logging.Abstractions (When you need to track the debugging when everything is so clear at a glance)
  • 5 DAO
    • 5.1 DAO
    • 5.2 DAO Tool
      • 5.2.1 Template Xml & Entity & DAO
      • 5.2.2 Generate Tool
  • 6 Query Cache
    • 6.1 SmartSql.Cache.Memory
      • 6.1.1 Fifo
      • 6.1.2 Lru
    • 6.2 SmartSql.Cache.Redis
    • 6.3 Cache transaction consistency
  • 7 Distributed configuration plugin
    • 7.1 IConfigLoader
    • 7.2 LocalFileConfigLoader √ (Local file configuration loader)
      • 7.2.1 Load SmartSqlMapSource Xml √
      • 7.3.1 Load SmartSqlMapSource Directory √
    • 7.3 SmartSql.ZooKeeperConfig √ (Distributed configuration file loader by ZooKeeper)

3. Performance

Query Times:1000000

ORM Total(ms)
SmartSql 63568
Dapper 60023
MyBaits 83566

Query Times:100000

ORM Total(ms)
SmartSql 6075
Dapper 5931
MyBaits 6574
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.3 is compatible.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (25)

Showing the top 5 NuGet packages that depend on SmartSql:

Package Downloads
SmartSql.DyRepository

SmartSql = MyBatis + Cache(Memory | Redis) + ZooKeeper + R/W Splitting +Dynamic Repository ....

SmartSql.DIExtension

SmartSql = MyBatis + Cache(Memory | Redis) + ZooKeeper + R/W Splitting +Dynamic Repository ....

SmartSql.TypeHandler

SmartSql = MyBatis + Cache(Memory | Redis) + ZooKeeper + R/W Splitting +Dynamic Repository ....

SmartSql.Bulk

SmartSql = MyBatis + Cache(Memory | Redis) + ZooKeeper + R/W Splitting +Dynamic Repository ....

SmartSql.ScriptTag

SmartSql = MyBatis + Cache(Memory | Redis) + ZooKeeper + R/W Splitting +Dynamic Repository ....

GitHub repositories (4)

Showing the top 4 popular GitHub repositories that depend on SmartSql:

Repository Stars
SkyAPM/SkyAPM-dotnet
The .NET/.NET Core instrument agent for Apache SkyWalking
ElderJames/shriek-fx
An easy-to-use rapid development framework developed on the basis of.NET Core 2.0, following the constraints of domain Driven Design (DDD) specifications, combined with the CQRS architecture to provide the infrastructure for event-driven, event backtracking, responsiveness, and more. Let developers enjoy the true meaning of object-oriented design patterns brought by the aesthetic.
dotnetcore/SmartCode
SmartCode = IDataSource -> IBuildTask -> IOutput => Build Everything!!!
lindexi/lindexi_gd
博客用到的代码
Version Downloads Last Updated
4.1.67 14,282 10/19/2023
4.1.66 2,023 9/21/2023
4.1.65 1,252 9/21/2023
4.1.64 29,833 5/13/2022
4.1.63 6,419 5/4/2022
4.1.62 6,310 4/29/2022
4.1.59 7,157 3/10/2022
4.1.58 6,708 3/3/2022
4.1.57 13,334 11/17/2020
4.1.56 8,468 7/14/2020
4.1.55 5,791 6/18/2020
4.1.54 4,835 6/12/2020
4.1.53 5,888 4/8/2020
4.1.52 6,032 3/27/2020
4.1.51 5,061 3/21/2020
4.1.50 7,363 3/9/2020
4.1.48 4,608 3/5/2020
4.1.46 4,857 12/18/2019
4.1.45 4,547 12/18/2019
4.1.44 5,340 12/5/2019
4.1.43 4,667 11/20/2019
4.1.42 4,962 11/18/2019
4.1.40 4,537 11/12/2019
4.1.39 4,707 11/6/2019
4.1.38 4,654 10/29/2019
4.1.37 4,549 10/29/2019
4.1.36 4,599 10/29/2019
4.1.35 4,552 10/29/2019
4.1.34 4,522 10/28/2019
4.1.33 4,553 10/28/2019
4.1.32 14,000 9/30/2019
4.1.31 4,573 9/29/2019
4.1.30 4,573 9/27/2019
4.1.29 4,485 9/26/2019
4.1.28 4,796 9/2/2019
4.1.27 4,506 8/30/2019
4.1.26 4,556 8/30/2019
4.1.25 4,612 8/30/2019
4.1.24 4,685 8/28/2019
4.1.23 9,868 8/20/2019
4.1.22 4,481 8/19/2019
4.1.21 4,707 8/13/2019
4.1.20 4,638 8/13/2019
4.1.19 4,682 8/13/2019
4.1.18 12,470 8/5/2019
4.1.17 4,620 8/1/2019
4.1.16 4,583 8/1/2019
4.1.15 4,561 7/30/2019
4.1.14 4,488 7/30/2019
4.1.12 4,594 7/30/2019
4.1.11 4,663 7/30/2019
4.1.9 4,604 7/29/2019
4.1.8 4,609 7/29/2019
4.1.7 4,525 7/29/2019
4.1.6 4,587 7/29/2019
4.1.5 4,524 7/27/2019
4.1.3 4,568 7/26/2019
4.1.2 4,557 7/25/2019
4.1.1 4,348 7/25/2019
4.1.0 4,515 7/24/2019
4.0.88 4,465 7/24/2019
4.0.86 5,200 7/22/2019
4.0.85 4,490 7/22/2019
4.0.84 4,485 7/22/2019
4.0.81 4,667 7/19/2019
4.0.80 4,443 7/19/2019
4.0.78 4,455 7/19/2019
4.0.76 4,640 7/17/2019
4.0.75 6,858 7/10/2019
4.0.73 4,626 7/10/2019
4.0.72 4,725 7/5/2019
4.0.71 4,783 6/25/2019
4.0.70 4,593 6/25/2019
4.0.69 4,526 6/25/2019
4.0.68 4,564 6/20/2019
4.0.66 4,664 6/18/2019
4.0.65 4,674 6/17/2019
4.0.63 6,474 6/12/2019
4.0.62 4,699 6/12/2019
4.0.60 4,631 6/11/2019
4.0.59 4,486 6/11/2019
4.0.58 4,713 6/3/2019
4.0.56 4,557 5/31/2019
4.0.55 4,446 5/30/2019
4.0.53 4,382 5/30/2019
4.0.52 4,449 5/30/2019
4.0.51 4,326 5/30/2019
4.0.50 4,458 5/29/2019
4.0.49 4,565 5/29/2019
4.0.48 4,459 5/24/2019
4.0.46 5,692 5/15/2019
4.0.45 4,222 5/10/2019
4.0.44 4,022 5/7/2019
4.0.43 3,950 5/7/2019
4.0.42 4,180 4/28/2019
4.0.41 3,905 4/28/2019
4.0.40 3,992 4/26/2019
4.0.38 4,053 4/26/2019
4.0.36 4,085 4/25/2019
4.0.35 4,067 4/25/2019
4.0.34 3,893 4/23/2019
4.0.33 4,011 4/19/2019
4.0.32 4,019 4/19/2019
4.0.30 3,917 4/19/2019
4.0.29 3,726 4/18/2019
4.0.28 3,784 4/18/2019
4.0.26 3,755 4/18/2019
4.0.25 3,815 4/17/2019
4.0.21 3,783 4/17/2019
4.0.20 3,820 4/16/2019
4.0.19 3,865 4/15/2019
4.0.18 3,797 4/15/2019
4.0.16 3,808 4/11/2019
4.0.15 3,753 4/11/2019
4.0.14 3,867 4/9/2019
4.0.13 3,811 4/9/2019
4.0.12 3,892 4/4/2019
4.0.11 3,794 4/4/2019
4.0.10 1,228 4/3/2019
4.0.9 800 4/3/2019
4.0.8 1,192 4/3/2019
4.0.7 1,183 4/3/2019
4.0.6 1,141 4/3/2019
4.0.5 1,202 4/2/2019
4.0.4 1,200 4/2/2019
4.0.3 5,206 4/2/2019
4.0.2 1,184 4/1/2019
4.0.1 1,017 4/1/2019
4.0.0 4,464 4/1/2019
4.0.0-rc999 821 3/31/2019
4.0.0-rc998 756 3/29/2019
4.0.0-rc997 1,311 3/29/2019
4.0.0-rc996 1,867 3/29/2019
4.0.0-rc995 731 3/28/2019
4.0.0-rc994 720 3/28/2019
4.0.0-rc993 1,683 3/28/2019
4.0.0-rc991 777 3/27/2019
4.0.0-rc990 763 3/27/2019
4.0.0-rc99 781 3/27/2019
4.0.0-rc98 757 3/26/2019
4.0.0-rc97 770 3/26/2019
4.0.0-rc96 1,549 3/26/2019
4.0.0-rc95 1,926 3/25/2019
4.0.0-rc93 1,098 3/25/2019
4.0.0-rc92 1,052 3/25/2019
4.0.0-rc91 1,393 3/22/2019
4.0.0-rc9 1,304 3/22/2019
4.0.0-rc8 850 3/21/2019
4.0.0-rc6 940 3/21/2019
4.0.0-rc5 758 3/20/2019
4.0.0-rc3 891 3/18/2019
4.0.0-rc2 553 3/18/2019
4.0.0-rc10 748 3/22/2019
4.0.0-rc1 2,218 3/17/2019
4.0.0-beta5 1,344 3/16/2019
4.0.0-beta4 786 3/11/2019
4.0.0-beta3 753 3/9/2019
4.0.0-beta2 1,474 3/8/2019
4.0.0-beta1 1,478 3/7/2019
3.8.15 1,447 4/26/2019
3.8.13 807 4/9/2019
3.8.12 2,451 12/17/2018
3.8.9 796 3/26/2019
3.8.8 1,339 12/5/2018
3.8.6 1,504 11/29/2018
3.8.5 945 11/29/2018
3.8.4 2,080 11/9/2018
3.8.2 2,509 10/30/2018
3.8.0 1,608 10/29/2018
3.7.16 3,695 10/26/2018
3.7.15 2,143 10/24/2018
3.7.15-rc4 763 10/24/2018
3.7.15-rc2 813 10/23/2018
3.7.13 1,375 10/22/2018
3.7.12 980 10/22/2018
3.7.11 1,434 10/21/2018
3.7.10 1,470 10/11/2018
3.7.9 1,232 10/10/2018
3.7.8 1,462 9/30/2018
3.7.6 1,222 9/28/2018
3.7.5 1,196 9/26/2018
3.7.3 1,006 9/26/2018
3.7.2 1,001 9/25/2018
3.7.1 1,039 9/25/2018
3.7.0 1,453 9/18/2018
3.7.0-pre6 843 9/17/2018
3.6.9 1,037 9/16/2018
3.6.8.2 1,054 9/12/2018
3.6.8.1 1,297 9/9/2018
3.6.7 1,463 9/7/2018
3.6.5 2,354 9/1/2018
3.6.4 1,390 8/28/2018
3.6.2 1,261 8/23/2018
3.6.1 1,507 8/13/2018
3.6.0 1,972 8/8/2018
3.6.0-rc2 1,051 8/7/2018
3.6.0-rc1 1,024 8/5/2018
3.6.0-pre9 1,010 8/5/2018
3.6.0-pre8 1,064 8/5/2018
3.6.0-pre6 1,074 8/4/2018
3.6.0-pre3 956 8/3/2018
3.6.0-pre1 1,332 8/3/2018
3.5.14 1,169 8/2/2018
3.5.13 1,197 8/2/2018
3.5.12 1,180 8/2/2018
3.5.11 1,165 8/2/2018
3.5.10 1,189 8/1/2018
3.5.9 1,123 8/1/2018
3.5.8 1,638 7/31/2018
3.5.5 1,581 7/31/2018
3.5.3 2,341 7/25/2018
3.5.2 1,171 7/25/2018
3.5.1 1,394 7/25/2018
3.5.0 1,551 7/24/2018
3.5.0-pre2 1,121 7/23/2018
3.5.0-pre1 979 7/21/2018
3.4.8 1,921 7/19/2018
3.4.6 1,579 7/19/2018
3.4.3 1,391 7/19/2018
3.4.2 1,376 7/18/2018
3.4.0 1,365 7/18/2018
3.3.18 2,059 7/13/2018
3.3.16 1,197 7/12/2018
3.3.12 1,365 7/12/2018
3.3.11 1,552 7/5/2018
3.3.10 1,358 7/4/2018
3.3.8 1,675 7/1/2018
3.3.6 2,421 6/26/2018
3.3.4 2,361 6/26/2018
3.3.3 1,623 6/25/2018
3.3.1 1,984 6/13/2018
3.2.0 2,053 6/11/2018
3.1.0 1,827 6/9/2018
3.0.1 1,806 6/4/2018
3.0.0 2,884 6/2/2018
3.0.0-rc93 1,219 6/1/2018
3.0.0-rc92 1,370 5/31/2018
3.0.0-rc91 1,187 5/30/2018
3.0.0-rc8 1,170 5/29/2018
3.0.0-rc6 1,658 5/28/2018
3.0.0-rc5 1,252 5/27/2018
3.0.0-rc4 1,159 5/18/2018
3.0.0-rc3 1,159 5/16/2018
3.0.0-pre8 1,821 5/15/2018
3.0.0-pre4 1,295 5/12/2018
3.0.0-pre3 1,268 5/8/2018
3.0.0-pre2 1,219 5/7/2018
3.0.0-pre1 1,225 5/6/2018
2.3.2 3,068 3/25/2018
2.3.0 1,662 3/24/2018
2.2.8 1,761 3/8/2018
2.2.6 1,531 3/6/2018
2.2.2 1,723 2/5/2018
2.2.1 2,174 12/27/2017
2.2.0.2 1,843 12/27/2017
2.2.0.1 3,952 11/8/2017
2.2.0 1,795 11/7/2017
2.2.0-preview 1,292 11/3/2017
2.1.0-preview2 1,099 11/3/2017
2.0.18.8 1,378 10/24/2017
2.0.18.6 1,613 10/13/2017
2.0.18.5 1,359 10/10/2017
2.0.18.2 1,393 10/8/2017
2.0.18 1,887 9/28/2017
2.0.16 1,944 9/19/2017
2.0.15 1,651 9/19/2017
2.0.13 1,616 9/18/2017
2.0.12 1,619 9/18/2017
2.0.8 1,360 9/14/2017
2.0.6 1,363 9/12/2017
2.0.5 1,584 9/1/2017
2.0.4 1,431 8/30/2017
2.0.3 2,177 8/21/2017
2.0.0 1,653 8/16/2017
2.0.0-preview3-final 1,097 8/16/2017
2.0.0-preview2-final 1,337 8/16/2017
1.8.8.2 1,497 8/16/2017
1.8.8.1 1,445 8/15/2017
1.8.6.1 1,642 8/14/2017
1.8.6 1,601 8/11/2017
1.8.5 1,415 8/10/2017
1.8.3 1,429 8/10/2017
1.8.2 1,405 8/10/2017
1.8.0 1,420 8/10/2017
1.7.8 1,412 8/9/2017
1.6.7 1,661 8/8/2017
1.6.6 2,569 7/24/2017
1.6.2 1,894 7/19/2017
1.5.9 1,518 7/11/2017
1.5.8.1 1,816 5/27/2017
1.5.8 1,925 5/25/2017
1.5.5 1,994 5/23/2017
1.5.3 1,998 5/22/2017
1.5.2 2,014 5/22/2017
1.5.0 1,689 5/20/2017
1.4.9 1,981 4/25/2017
1.4.8 2,611 4/25/2017
1.4.4 1,992 4/21/2017
1.4.3 2,278 4/20/2017
1.4.2 2,239 4/20/2017
1.3.1 1,728 4/18/2017
1.2.0 1,974 4/17/2017
1.1.0 1,644 4/13/2017
1.0.4 1,705 4/7/2017
1.0.2 2,038 4/3/2017

0. add [For Tag] to support iterate.
1. add support global parameter prefix (defalut=$).
2. add [Env Tag]  to support different DBProvider.
3. update Schemas to support above features.