title: AutoMapper with auto-incremented values
body: <pre><code>public class OrderDTO
  {
      public string ClientName { get; set; }
      public ICollection&lt;OrderDetailDTO&gt; Details { get; set; }
  }
  
  public class Order
  {
      public string ClientName { get; set; }
      public ICollection&lt;OrderDetail&gt; Details { get; set; }
  }
  
  public class OrderDetailDTO
  {
      public int Quantity { get; set; }
      public string ProductName { get; set; }
  }
  
  public class OrderDetail
  {
      public int OrderId { get; set; }
      public int Quantity { get; set; }
      public string ProductName { get; set; }
  }
  </code></pre>
  
  <p>Let's say there are 4 <code>OrderDetailDTO</code>, I want to have the mapped <code>OrderDetail</code> instances with auto-incremented integer values. What I am doing now is post-process the mapped instance.</p>
  
  <pre><code>var mappedOrder = Mapper.Map&lt;OrderDTO, Order&gt;(orderDto);
  var orderId = 1;
  foreach (OrderDetail detail in mappedOrder.Details)
  {
      detail.OrderId = orderId++;
  }
  </code></pre>
  
  <p>How can I configure the mapping options, so that the mapped <code>ICollection&lt;OrderDetail&gt;</code> contains 4 <code>OrderDetail</code> instances with <code>OrderId</code> as 1, 2, 3, 4?</p>