diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs index f60408715..73d6afb75 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs @@ -392,12 +392,12 @@ namespace SqlSugar FieldValue = String.Join(",", ids), CSharpTypeName = navPkColumn?.UnderType?.Name })); - if (NavigationGlobalInstanceRegistry.IsAny()) + if (OneToOneGlobalInstanceRegistry.IsAny()) { foreach (var item in list) { var firstObj = navObjectNamePropety.GetValue(item); - if (NavigationGlobalInstanceRegistry.IsNavigationInitializerCreated(firstObj)) + if (OneToOneGlobalInstanceRegistry.IsNavigationInitializerCreated(firstObj)) { navObjectNamePropety.SetValue(item,null); } diff --git a/Src/Asp.NetCore2/SqlSugar/Entities/NavigationInitializer.cs b/Src/Asp.NetCore2/SqlSugar/Entities/NavigationInitializer.cs index 2fb27abb8..0eda195b2 100644 --- a/Src/Asp.NetCore2/SqlSugar/Entities/NavigationInitializer.cs +++ b/Src/Asp.NetCore2/SqlSugar/Entities/NavigationInitializer.cs @@ -7,7 +7,7 @@ using System.Text; namespace SqlSugar { - internal static class NavigationGlobalInstanceRegistry + internal static class OneToOneGlobalInstanceRegistry { private static readonly Dictionary _instances = new Dictionary(); private static readonly object _lock = new object(); @@ -49,13 +49,13 @@ namespace SqlSugar { Type type = typeof(T); - if (!NavigationGlobalInstanceRegistry.Instances.ContainsKey(type)) + if (!OneToOneGlobalInstanceRegistry.Instances.ContainsKey(type)) { T instance = new T(); - NavigationGlobalInstanceRegistry.RegisterInstance(type, instance); + OneToOneGlobalInstanceRegistry.RegisterInstance(type, instance); } - return (T)NavigationGlobalInstanceRegistry.Instances[type]; + return (T)OneToOneGlobalInstanceRegistry.Instances[type]; } } }