Skip to content

Commit

Permalink
Merge pull request #16 from SellerCloudTeam/feature/Fixed_threadsafe_…
Browse files Browse the repository at this point in the history
…issue

Fixed thread-safe issue
  • Loading branch information
verdie-g authored Jun 1, 2019
2 parents de4aba7 + 8ef1a2c commit f3aa6a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion StoredProcedureEFCore/Mapper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq.Expressions;
Expand All @@ -13,7 +14,7 @@ namespace StoredProcedureEFCore
/// <typeparam name="T">Model type</typeparam>
internal class Mapper<T> where T : class, new()
{
private static Dictionary<CacheKey, Prop[]> _propertiesCache = new Dictionary<CacheKey, Prop[]>();
private static ConcurrentDictionary<CacheKey, Prop[]> _propertiesCache = new ConcurrentDictionary<CacheKey, Prop[]>();

private DbDataReader _reader;
private Prop[] _properties;
Expand Down

0 comments on commit f3aa6a7

Please sign in to comment.