This commit is contained in:
xuejiaming 2024-04-20 09:09:35 +08:00
parent b730c4e49a
commit 1e715ffa2e
3 changed files with 15 additions and 6 deletions

View File

@ -1,11 +1,11 @@
:start :start
::定义版本 ::定义版本
set EFCORE8=7.8.1.20 set EFCORE8=7.8.1.21
set EFCORE7=7.7.1.20 set EFCORE7=7.7.1.21
set EFCORE6=7.6.1.20 set EFCORE6=7.6.1.21
set EFCORE5=7.5.1.20 set EFCORE5=7.5.1.21
set EFCORE3=7.3.1.20 set EFCORE3=7.3.1.21
set EFCORE2=7.2.1.20 set EFCORE2=7.2.1.21
::删除所有bin与obj下的文件 ::删除所有bin与obj下的文件
@echo off @echo off

View File

@ -35,6 +35,10 @@ namespace ShardingCore.Core.VirtualRoutes.DataSourceRoutes.Abstractions
public virtual object GetCompareValueByShardingKey(object shardingKey, string shardingPropertyName) public virtual object GetCompareValueByShardingKey(object shardingKey, string shardingPropertyName)
{ {
if (EntityMetadata.IsMainShardingDataSourceKey(shardingPropertyName))
{
return ShardingKeyToDataSourceName(shardingKey);
}
return shardingKey; return shardingKey;
} }

View File

@ -40,8 +40,13 @@ namespace ShardingCore.Core.VirtualRoutes.TableRoutes.Abstractions
return sqlRouteUnits; return sqlRouteUnits;
} }
public virtual object GetCompareValueByShardingKey(object shardingKey, string shardingPropertyName) public virtual object GetCompareValueByShardingKey(object shardingKey, string shardingPropertyName)
{ {
if (EntityMetadata.IsMainShardingTableKey(shardingPropertyName))
{
return ShardingKeyToTail(shardingKey);
}
return shardingKey; return shardingKey;
} }