I have seen how to convert a ConcurrentDictionary to a Dictionary, but I have a dictionary and would like to convert to a ConcurrentDictionary. How do I do that?... better
Or just a have method:
private ConcurrentDictionary ToConcurrent(Dictionary dic) {
return new ConcurrentDictionary(dic);
}
and then do:
var customers = _customerRepo.Query().Select().ToDictionary(x => x.id, x => x);
var concurrentDic = ToConcurrent(customers);
Personally, I'm going with the extension method that I just updated...