Why we need to protect concurrent access to the dictionary ?

Mar 15, 2012 at 3:36 PM

why in TaxonomySlugConstraint is used :

private IDictionary<string, string> _slugs = new Dictionary<string, string>();

with a lot of lock (_syncLock), instead of

private IDictionary<string, string> _slugs = new ConcurrentDictionary<string, string>();

with echivalent try (TryAdd, TryGetValue...) methods ?