Skip to content

Commit cef3635

Browse files
committed
Merge branch 'main' of github.com:dotnetcore/sharding-core
2 parents c4069b1 + 14ee07f commit cef3635

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/ShardingCore/Core/TrackerManagers/TrackerManager.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,16 @@ public bool IsDbContextModel(Type entityType)
6767

6868
public Type TranslateEntityType(Type entityType)
6969
{
70-
if (!_dbContextModels.ContainsKey(entityType))
70+
if (_shardingConfigOptions.UseEntityFrameworkCoreProxies)
7171
{
72-
if (_shardingConfigOptions.UseEntityFrameworkCoreProxies && entityType.BaseType != null)
72+
if (!_dbContextModels.ContainsKey(entityType))
7373
{
74-
if (_dbContextModels.ContainsKey(entityType.BaseType))
74+
if (entityType.BaseType != null)
7575
{
76-
return entityType.BaseType;
76+
if (_dbContextModels.ContainsKey(entityType.BaseType))
77+
{
78+
return entityType.BaseType;
79+
}
7780
}
7881
}
7982
}

0 commit comments

Comments
 (0)