title: AutoMapper - mapping strings into object of same name
body: <p>I am mapping between two objects, the source contains two strings called <code>Animal</code>and <code>AnimalColor</code>, for instance <code>Animal = "Cat"</code> and <code>AnimalColor = "White"</code>. The destination contains a property <code>Animal</code> which is a class of type <code>Pet</code> which contains two strings, <code>Type</code> And <code>Color</code></p>
  
  <p>Therefore I have the following in my mapper configuration:</p>
  
  <pre><code>cfg.CreateMap&lt;SrcPetStore, DestPetStore&gt;()
      .ForMember(dest =&gt; dest.Animal, opt =&gt; opt.MapFrom(src =&gt; new Pet() { Type = src.Animal, Color = src.AnimalColor }));
  </code></pre>
  
  <p>When I run this I get an <code>AutoMapperMappingException</code> complaining about <code>Missing type map configuration or unsupported mapping</code> on mapping
  <code>String -&gt; Pet</code></p>
  
  <p>It's like it tries to map the destination <code>Animal</code> (Pet object) from the source <code>Animal</code> (string) without taking the custom ForMember configuration into account</p>
  
  <p>If I add an unused mapping <code>cfg.CreateMap&lt;string, Pet&gt;()</code> everything works but it shouldn't be necessary since that mapping is never used (and makes no sense)</p>
  
  <p>This is in AutoMapper 5.0.</p>