From 8ef1a2c1c77b935793b82d88ee55cf8f4f4ee7eb Mon Sep 17 00:00:00 2001 From: Lazar Kanelov Date: Fri, 31 May 2019 14:55:33 +0300 Subject: [PATCH] Replaced the Dictionary with ConcurrentDictionary --- StoredProcedureEFCore/Mapper.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/StoredProcedureEFCore/Mapper.cs b/StoredProcedureEFCore/Mapper.cs index 910b646..4f8068f 100644 --- a/StoredProcedureEFCore/Mapper.cs +++ b/StoredProcedureEFCore/Mapper.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Data.Common; using System.Linq.Expressions; @@ -13,7 +14,7 @@ namespace StoredProcedureEFCore /// Model type internal class Mapper where T : class, new() { - private static Dictionary _propertiesCache = new Dictionary(); + private static ConcurrentDictionary _propertiesCache = new ConcurrentDictionary(); private DbDataReader _reader; private Prop[] _properties;