title: Automapper 5.1.1 inheritance mapping
body: <p>Hello I cant get my mappings working for inherited class.
  Idea is to create map for base object and interface only once, and when child classes implements their own members, configure mapping nly for those members that are not defined in base class or intrface.</p>
  
  <p>Let me begin with sample code.</p>
  
  <pre><code>public class DtoClass {
     public string Field1 { get; set; }
     public string Field2 { get; set; }
     public string Field3 { get; set; }
  }
  
  public interface IField3 {
     public string EntityField3 { get; set; }
  }
  
  public class BaseEntityClass {
     public string EntityField1 { get; set; }
  }
  
  public class ChildEntityClass : BaseEntityClass, IField3  {
     public string EntityField2 { get; set; }
     public string EntityField3 { get; set; }
  }
  
  
  CreateMap&lt;BaseEntityClass, DtoClass&gt;()
     .ForMember(c =&gt; c.Field1 , m =&gt; m.MapFrom(a =&gt; a.EntityField1))
     .Include&lt;ChildEntityClass, DtoClass&gt;();
  
  CreateMap&lt;IField3, DtoClass&gt;()
     .ForMember(c =&gt; c.Field3 , m =&gt; m.MapFrom(a =&gt; a.EntityField3));
  
  CreateMap&lt;ChildEntityClass, DtoClass&gt;()
     .ForMember(c =&gt; c.Field2 , m =&gt; m.MapFrom(a =&gt; a.EntityField2));
  </code></pre>
  
  <p>Attached code dosnt work ofcourse. when calling :</p>
  
  <pre><code>AutoMapper.Mapper.Map&lt;ChildEntityClass, DtoClass&gt;(instanceOfChildEntityClass);
  </code></pre>
  
  <p>I get only mapped members that are defined in <code>CreateMap&lt;ChildEntityClass, DtoClass&gt;().</code></p>
  
  <p>Any idea how to implement mappings for base class and interfaces only once?
  And yes i want to map all types ChildEntityClass, BaseEntityClass and IField3 to DtoClass.</p>
  
  <p>Any hints are welcome for elegant configuration such mappings.</p>
  
  <p>Edit: I remove unecssary IncludeBase from subclass for clarity, but none of both<br>
   - IncludeBase in subclass
   - Include in base class
  Works for me. What can cause such problems ?</p>