title: Automapper - Inheritance mapper not working with type converter
body: <p>Can't use Mapping Inheritance and TypeConverter together.</p>
  
  <p>I have this code:</p>
  
  <pre><code>/* BaseClassTypeConverter.cs */
  public class BaseClassTypeConverter : ITypeConverter&lt;SourceClass, BaseClass&gt; {
      public BaseClass Convert(ResolutionContext context) {
          if (context == null || context.IsSourceValueNull)
              return null;
  
          var src = (SourceClass)context.SourceValue;
  
          return new BaseClass() {
              CommonAttr = src.SourceAttr
          };
      }
  }
  
  /* AutoMapperConfig.cs */
  public static class AutoMapperConfig {
  
      public static void RegisterMappings() {
          AutoMapper.Mapper.Initialize(config =&gt; {
              config
                  .CreateMap&lt;SourceClass, BaseClass&gt;()
                  .Include&lt;SourceClass, DerivedClass1&gt;()
                  .Include&lt;SourceClass, DerivedClass2&gt;()  
                  .ForMember(dest =&gt; dest.CommonAttr, o =&gt; o.MapFrom(src =&gt; src.SourceAttr));
                  //.ConvertUsing&lt;BaseClassTypeConverter&gt;(); //  NOT WORKING
  
              config
                  .CreateMap&lt;SourceClass, DerivedClass1&gt;()
                  .ForMember(dest =&gt; dest.Dummy, o =&gt; o.MapFrom(src =&gt; src.SourceAttr2))
                  .IncludeBase&lt;SourceClass, BaseClass&gt;();
          });
      }
  }
  </code></pre>
  
  <p>As you can see, I want to be able to map from a TypeConverter class, because I have some more complex computations to do, not just assign values as above.</p>
  
  <p>When I use the type converter the mappings don't work, however when I remove the ConvertUsing and use inline mapping with ForMember all works just fine.</p>
  
  <p>It is something I'm missing?</p>
  
  <p>PD. I'm using: AutoMapper: version="4.2.1", targetFramework="net452"</p>