title: Map List<> with Automapper?
body: <p>I have two classes:</p>
  
  <pre><code>public class CustomerDTO
  {
  
  public string Name {get;set;}
  public List&lt;Order&gt; Orders {get;set;}
  
  }
  
  public class OrderDTO
  {
  public string Name {get;set;}
  public string Description {get;set;}
  public decimal Cost{get;set;}
  }
  </code></pre>
  
  <p>I am using AutoMapper for .NET 3.5 and currently doing the following in my Application_StartUp:</p>
  
  <pre><code>Mapper.CreateMap&lt;Customer, CustomerDTO&gt;();
  Mapper.CreateMap&lt;Order,OrderDTO&gt;();
  </code></pre>
  
  <p>This is a simplified example as I named my DTO properties different than my entity properties, so I used ForMember, but I am unclear on how to map Orders to Customer:</p>
  
  <p>I tried:</p>
  
  <pre><code>Mapper.CreateMap&lt;Customer, CustomerDTO()
  .ForMember(dest =&gt; dest.Orders, opt=&gt; opt.MapFrom(src=&gt;src.Orders));
  </code></pre>
  
  <p>but it does not find <code>src.Orders</code>.</p>
  
  <p>If I do indeed need to have both <code>CreateMap</code> statements, does <code>AutoMapper</code> "automatically" link the objects <code>Customer</code> to <code>Orders</code>?</p>