title: Mapping dictionaries with AutoMapper
body: <p>Given this these classes, how can I map a dictionary of them?</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class TestClass
  {
      public string Name { get; set; }
  }
  
  public class TestClassDto
  {
      public string Name { get; set; }
  }
  
  
  Mapper.CreateMap&lt;TestClass, TestClassDto&gt;();
  Mapper.CreateMap&lt;Dictionary&lt;string, TestClass&gt;, 
                    Dictionary&lt;string, TestClassDto&gt;&gt;();
  
  var testDict = new Dictionary&lt;string, TestClass&gt;();
  var testValue = new TestClass() {Name = "value1"};
  testDict.Add("key1", testValue);
  
  var mappedValue = Mapper.Map&lt;TestClass, TestClassDto&gt;(testValue);
  
  var mappedDict = Mapper.Map&lt;Dictionary&lt;string, TestClass&gt;, 
                              Dictionary&lt;string, TestClassDto&gt;&gt;(testDict);
  </code></pre>
  
  <p>Mapping one of them, mappedValue in this case, works fine.</p>
  
  <p>Mapping a dictionary of them ends up with no entries in the destination object.</p>
  
  <p>What am I doing worng?</p>