title: How to map to class with multiple implementations using Automapper
body: <p>I have configuration file in JSON format that have a list of configurations for my classes. I read configuration to BaseDTO class that have all common configurations and I would like to map those BaseDTO to specific implementations of  Base class basing on field Type. Is there any way to tell automapper to use some custom mapping logic to tell it which class to create? </p>
  
  <pre><code>    //Map in automapper: CreateMap&lt;BaseDTO, Base&gt;();
  
      public class BaseDTO
      {
          public string Type { get; set; }
          // rest of config from json
      }
  
      public class Base
      {
          public string Type { get; set; }
          // rest of config mapped from BaseDTO
      }
  
      public class A : Base
      {
  
      }
  
      public class B : Base
      {
  
      }
  
      public class C : Base
      {
  
      }
  </code></pre>