title: Map list inside class to a list inside another class using Automapper
body: <p>I am trying to map property ProjectLocation inside class Project with property Project_Locations inside class Project_Master  </p>
  
  <pre><code>public class Project
  {
     public int ProjectId { get; set; }
     public string ProjectCode { get; set; }
     public virtual ICollection&lt;ProjectLocation&gt; ProjectLocation { get; set; }
  }
  
  public partial class Project_Master
  {
    public int ProjectId { get; set; }
    public string ProjectCode { get; set; }
    public virtual ICollection&lt;Project_Locations&gt; Project_Locations { get; set; }
  }
  
  public partial class Project_Locations
  {
      public int ProjectLocationId { get; set; }
      public int ProjectId { get; set; }
      public virtual Project_Master Project_Master { get; set; }
  }
  
  public class ProjectLocation
  {
      public int ProjectLocationId { get; set; }
      public int ProjectId { get; set; }
      public virtual Project Project { get; set; }
  }
  </code></pre>
  
  <p>My mapper configuration</p>
  
  <pre><code>CreateMap&lt;Models.Project.Project, Dal.Repository.Project_Master&gt;();
  CreateMap&lt;Models.Project.ProjectLocation, Dal.Repository.Project_Locations&gt;();
  </code></pre>
  
  <p>Instance of class</p>
  
  <pre><code>Models.Project.Project project = new Models.Project.Project();
  project.ProjectId = 1;
  project.ProjectLocation = new List&lt;Models.Project.ProjectLocation&gt;();
  project.ProjectLocation.Add(new Models.Project.ProjectLocation() { LocationId = 2, ProjectId = 1 });
  </code></pre>
  
  <p>Mapping code</p>
  
  <pre><code>var proj = mapper.Map&lt;Dal.Repository.Project_Master&gt;(project);
  </code></pre>