发布x.3.1.13
This commit is contained in:
parent
eb7e92f64f
commit
ffd3025a7a
|
@ -1,8 +1,8 @@
|
|||
:start
|
||||
::定义版本
|
||||
set EFCORE2=2.3.1.12
|
||||
set EFCORE3=3.3.1.12
|
||||
set EFCORE5=5.3.1.12
|
||||
set EFCORE2=2.3.1.13
|
||||
set EFCORE3=3.3.1.13
|
||||
set EFCORE5=5.3.1.13
|
||||
|
||||
::删除所有bin与obj下的文件
|
||||
@echo off
|
||||
|
|
|
@ -79,11 +79,14 @@ namespace ShardingCore
|
|||
foreach (var entity in context.Model.GetEntityTypes())
|
||||
{
|
||||
var entityType = entity.ClrType;
|
||||
var primaryKeyNames = ShardingKeyUtil.ParsePrimaryKeyName(entity);
|
||||
if (primaryKeyNames.Properties.Count == 1)
|
||||
if (entityType.IsShardingDataSource() || entityType.IsShardingTable())
|
||||
{
|
||||
var shardingEntityConfig = ShardingUtil.Parse(entityType);
|
||||
shardingEntityConfig.SinglePrimaryKeyFieldName = primaryKeyNames.Properties.First().Name;
|
||||
var primaryKeyNames = ShardingKeyUtil.ParsePrimaryKeyName(entity);
|
||||
if (primaryKeyNames.Properties.Count == 1)
|
||||
{
|
||||
var shardingEntityConfig = ShardingUtil.Parse(entityType);
|
||||
shardingEntityConfig.SinglePrimaryKeyFieldName = primaryKeyNames.Properties.First().Name;
|
||||
}
|
||||
}
|
||||
//添加追踪模型
|
||||
_trackerManager.AddDbContextModel(entityType);
|
||||
|
|
Loading…
Reference in New Issue