title: Is there a way to map a parent root class having multiple list classes-Including child classes using Automapper?
body: <p>I am able to create successful mapping but only one list class of parent root class gets mapped. From below code only List Designation class gets mapped while List Customfield class fails.</p>
  
  <p>Mapping :`</p>
  
  <pre><code>  cfg.CreateMap&lt;Emp,Designation&gt;()
    .ForMember(a =&gt; a.desigs, b =&gt; b.ResolveUsing(c =&gt; c.designations));
  
    cfg.CreateMap&lt;Emp, Employment&gt;()
     .ForMember(a =&gt; a.role, b =&gt; b.ResolveUsing(c =&gt; c..firstname));
  
    cfg.CreateMap&lt;RootObjectSource, RootObjectDest&gt;()
     .ForMember(a =&gt; a.Customfield, b =&gt; b.ResolveUsing(c =&gt; c.Emp));
  
    cfg.CreateMap&lt;Emp, Customfield&gt;()
     .ForMember(x =&gt; x.Customfield, y =&gt; y.MapFrom(x =&gt; x.Id));
  </code></pre>
  
  <p>Source class:</p>
  
  <pre><code> public class RootObjectSource
      {
          public List&lt;Emp&gt; employments{ get; set; }
      }
  
   public class Emp
      {
          public string Id{get; set;}
          public string Firstname{get; set;}
          public string Lastname{get; set;}
          public List&lt;Desig&gt; Desigs {get; set;}
      }
  
  public class Desig
      {             
           public string role{ get; set; }
           public string salary{ get; set; }
      }
  
   Destination classes:
  
       public class RootObjectDest
        {
         public string principal{ get; set; }
         public List&lt;Designation&gt; designations{ get; set; }
         public List&lt;Customfield&gt; Customfield { get; set; }
        }
  
    public class Designation
       {             
                public List&lt;Employment&gt; employment { get; set; }
                public string role{ get; set; }
                public string salary{ get; set; }
       }
     public class Employment
      {
          public string Firstname{ get; set; }
          public string Lastname{ get; set; }
      }  
      public class Customfield
      { 
        public string stringfield{ get; set; }
  
      } 
  </code></pre>
  
  <p>we need to map all list classes of destination class</p>