优化获取真实对象的方法
This commit is contained in:
parent
9485ae03c1
commit
14ee07fe38
|
@ -67,13 +67,16 @@ namespace ShardingCore.Core.TrackerManagers
|
||||||
|
|
||||||
public Type TranslateEntityType(Type entityType)
|
public Type TranslateEntityType(Type entityType)
|
||||||
{
|
{
|
||||||
if (!_dbContextModels.ContainsKey(entityType))
|
if (_shardingConfigOptions.UseEntityFrameworkCoreProxies)
|
||||||
{
|
{
|
||||||
if (_shardingConfigOptions.UseEntityFrameworkCoreProxies && entityType.BaseType != null)
|
if (!_dbContextModels.ContainsKey(entityType))
|
||||||
{
|
{
|
||||||
if (_dbContextModels.ContainsKey(entityType.BaseType))
|
if (entityType.BaseType != null)
|
||||||
{
|
{
|
||||||
return entityType.BaseType;
|
if (_dbContextModels.ContainsKey(entityType.BaseType))
|
||||||
|
{
|
||||||
|
return entityType.BaseType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue