Skip to content

Commit 5166bf0

Browse files
committed
修复bug
1 parent 339b543 commit 5166bf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ShardingCore/Extensions/DbContextExtension.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public static void RemoveDbContextRelationModelThatIsShardingTable(this DbContex
8585
contextModel.GetFieldValue("_entityTypes") as SortedDictionary<string, EntityType>;
8686
foreach (var entityType in entityTypes)
8787
{
88-
if (entityType.GetFieldValue("_data") is List<object> _data)
88+
if (entityType.Value.GetFieldValue("_data") is List<object> _data)
8989
{
9090
_data.Clear();
9191
}
@@ -186,7 +186,7 @@ public static void RemoveDbContextAllRelationModelWithoutShardingDataSourceOnly(
186186
contextModel.GetFieldValue("_entityTypes") as SortedDictionary<string, EntityType>;
187187
foreach (var entityType in entityTypes)
188188
{
189-
if (entityType.GetFieldValue("_data") is List<object> _data)
189+
if (entityType.Value.GetFieldValue("_data") is List<object> _data)
190190
{
191191
_data.Clear();
192192
}

0 commit comments

Comments
 (0)