title: Map from base list to another base list using derived types
body: <p>I'm trying to map something like the following.</p>
  
  <pre><code>public abstract class AnimalBLO { }
  
  public abstract class AnimalDLO { }
  
  public class HumanBLO : AnimalBLO { }
  
  public class HumanDLO : AnimalDLO { }
  
  public class LionBLO : AnimalBLO { }
  
  public class LionDLO : AnimalDLO { }
  
  internal class Program
  {
      private static void Main(string[] args)
      {
          Mapper.CreateMap&lt;HumanDLO, HumanBLO&gt;();
          Mapper.CreateMap&lt;LionDLO, LionBLO&gt;();
  
          var dlos = new List&lt;AnimalDLO&gt;()
          {
              new HumanDLO(),
              new LionDLO()
          };
  
          var result = Mapper.Map&lt;List&lt;AnimalBLO&gt;&gt;(dlos);
  
      }
  }
  </code></pre>
  
  <p>Where the base type for the list is AnimalBLO but they are mapped as the derived type.  Is there a way to do this without casting out all the objects, then unioning them back together?</p>
  
  <p>I thought this code would work:</p>
  
  <pre><code>        Mapper.CreateMap&lt;AnimalDLO, AnimalBLO&gt;()
              .Include&lt;HumanDLO, HumanBLO&gt;()
              .Include&lt;LionDLO, LionBLO&gt;();
  
          Mapper.CreateMap&lt;HumanDLO, HumanBLO&gt;();
          Mapper.CreateMap&lt;LionDLO, LionBLO&gt;();
  </code></pre>
  
  <p>However, the following exception message is thrown:</p>
  
  <blockquote>
    <p>{"Instances of abstract classes cannot be created."}</p>
  </blockquote>