title: Automapper flattening using child collection item
body: <p>I'm using Automapper for Below Source to Destination Mapping. There is a Child collection with in Source Object, and I want to use the First Item of that item for mapping.</p>
  
  <p><strong>Below is the Source and Destination Classes:</strong></p>
  
  <pre><code>class Source
  {
      public string Name { get; set; }
      public List&lt;InnerSource&gt; InnerSources { get; set; }
  
  }
  class InnerSource
  {
      public string InnerName { get; set; }
      public string InnerDesciption { get; set; }
  }
  
  class Destination
  {
      public string Name { get; set; }
      public string InnerName { get; set; }
      public string InnerDesciption { get; set; }
  }
  </code></pre>
  
  <p><strong>Mapper Configuration:</strong></p>
  
  <pre><code>cfg.CreateMap&lt;Source, Destination&gt;().IncludeMembers(s =&gt; s.InnerSources);
  cfg.CreateMap&lt;List&lt;InnerSource&gt;, Destination&gt;()
         .ForMember(d =&gt; d.InnerName, o =&gt; o.MapFrom(s =&gt; s.FirstOrDefault().InnerName))
         .ForMember(d =&gt; d.InnerDesciption, o =&gt; o.MapFrom(s =&gt; s.FirstOrDefault().InnerDesciption));
  </code></pre>
  
  <p>When I tried to map using the above configuration, it worked perfectly. </p>
  
  <pre><code>var source = new Source { 
              Name = "name", 
              InnerSources = new List&lt;InnerSource&gt; { 
                  new InnerSource { InnerName = "John", InnerDesciption = "person"}
              }
          };
          var destination = Mapper.Map&lt;Destination&gt;(source);
  </code></pre>
  
  <p>But the downside is, I had to map all properties from Source Child Collection individually.</p>
  
  <p>Is there any better approach to solve the above problem?</p>