Skip to content

Commit df85bb9

Browse files
committed
1
1 parent becb285 commit df85bb9

File tree

3 files changed

+36
-10
lines changed

3 files changed

+36
-10
lines changed

README.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
Release | EF Core | .NET Standard | .NET (Core)
1212
--- | --- | --- | ---
13-
[5.2.x.x](https://www.nuget.org/packages/ShardingCore/5.2.0.09) | >= 5.0.x | 2.1 | 3.0+
14-
[3.2.x.x](https://www.nuget.org/packages/ShardingCore/3.2.0.09) | 3.1.10 | 2.0 | 2.0+
15-
[2.2.x.x](https://www.nuget.org/packages/ShardingCore/2.2.0.09) | 2.2.6 | 2.0 | 2.0+
13+
[5.2.x.x](https://www.nuget.org/packages/ShardingCore/5.2.0.13) | >= 5.0.x | 2.1 | 3.0+
14+
[3.2.x.x](https://www.nuget.org/packages/ShardingCore/3.2.0.13) | 3.1.10 | 2.0 | 2.0+
15+
[2.2.x.x](https://www.nuget.org/packages/ShardingCore/2.2.0.13) | 2.2.6 | 2.0 | 2.0+
1616
### 数据库支持
1717
数据库 | 是否支持 | 支持情况
1818
--- | --- | ---
@@ -95,11 +95,11 @@ Oracle | 支持 | 未测试
9595

9696
## 安装
9797
```xml
98-
<PackageReference Include="ShardingCore" Version="5.2.0.09" />
98+
<PackageReference Include="ShardingCore" Version="LastVersion" />
9999
or
100-
<PackageReference Include="ShardingCore" Version="3.2.0.09" />
100+
<PackageReference Include="ShardingCore" Version="LastVersion" />
101101
or
102-
<PackageReference Include="ShardingCore" Version="2.2.0.09" />
102+
<PackageReference Include="ShardingCore" Version="LastVersion" />
103103
```
104104

105105
## 配置
@@ -295,7 +295,30 @@ AbstractSimpleShardingYearKeyLongVirtualTableRoute |按时间戳 |yyyy | `>,>=,<
295295
```
296296
## 手动路由
297297
```c#
298-
后续支出
298+
ctor inject IShardingRouteManager shardingRouteManager
299+
300+
public class SysUserModVirtualTableRoute : AbstractSimpleShardingModKeyStringVirtualTableRoute<SysUserMod>
301+
{
302+
/// <summary>
303+
/// 开启提示路由
304+
/// </summary>
305+
protected override bool EnableHintRoute => true;
306+
protected override bool EnableAssertRoute => true;
307+
308+
public SysUserModVirtualTableRoute() : base(2,3)
309+
{
310+
}
311+
}
312+
313+
314+
315+
316+
using (_shardingRouteManager.CreateScope())
317+
{
318+
_shardingRouteManager.Current.TryCreateOrAddMustTail<SysUserMod>("00");
319+
320+
var mod00s = await _defaultTableDbContext.Set<SysUserMod>().Skip(10).Take(11).ToListAsync();
321+
}
299322
```
300323

301324
## 自动建表

nuget-publish.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
:start
22
::定义版本
3-
set EFCORE2=2.2.0.12
4-
set EFCORE3=3.2.0.12
5-
set EFCORE5=5.2.0.12
3+
set EFCORE2=2.2.0.13
4+
set EFCORE3=3.2.0.13
5+
set EFCORE5=5.2.0.13
66

77
::删除所有bin与obj下的文件
88
@echo off

samples/Sample.SqlServer/Shardings/SysUserModVirtualTableRoute.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ namespace Sample.SqlServer.Shardings
1616
*/
1717
public class SysUserModVirtualTableRoute : AbstractSimpleShardingModKeyStringVirtualTableRoute<SysUserMod>
1818
{
19+
/// <summary>
20+
/// ¿ªÆôÌáʾ·ÓÉ
21+
/// </summary>
1922
protected override bool EnableHintRoute => true;
2023
protected override bool EnableAssertRoute => true;
2124

0 commit comments

Comments
 (0)