Browse Source

PropertyCallAdapterProvider

pull/10/head
sunkaixuna 3 years ago
parent
commit
390563bab2
  1. 6
      Src/Asp.Net/SqlSugar/Utilities/PropertyCallAdapterProvider.cs

6
Src/Asp.Net/SqlSugar/Utilities/PropertyCallAdapterProvider.cs

@ -25,8 +25,8 @@ namespace SqlSugar
}
public class PropertyCallAdapterProvider<TThis>
{
private static readonly Dictionary<string, IPropertyCallAdapter<TThis>> _instances =
new Dictionary<string, IPropertyCallAdapter<TThis>>();
private static readonly System.Collections.Concurrent.ConcurrentDictionary<string, IPropertyCallAdapter<TThis>> _instances =
new System.Collections.Concurrent.ConcurrentDictionary<string, IPropertyCallAdapter<TThis>>();
public static IPropertyCallAdapter<TThis> GetInstance(string forPropertyName)
{
@ -60,7 +60,7 @@ namespace SqlSugar
.CreateInstance(concreteAdapterType, getterInvocation)
as IPropertyCallAdapter<TThis>;
_instances.Add(forPropertyName, instance);
_instances.GetOrAdd(forPropertyName, instance);
}
return instance;

Loading…
Cancel
Save