mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-05 03:17:41 +08:00
Rename
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Text;
|
||||
|
||||
namespace SqlSugar
|
||||
{
|
||||
internal static class NavigationGlobalInstanceRegistry
|
||||
internal static class OneToOneGlobalInstanceRegistry
|
||||
{
|
||||
private static readonly Dictionary<Type, object> _instances = new Dictionary<Type, object>();
|
||||
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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user