title: Automapper Composite DTO to ViewModel conversion
body: <p>In some cases there is a need to return composite DTOs from our repository, where the DTO just has a few properties that are Model properties and the function of the DTO is just to be a simple composite object (returning a Queryable is not enough because there is more information than T)</p>
  
  <p>For example:</p>
  
  <p>Model:</p>
  
  <pre><code>public class Job
  {
      int Id { get; set; }
      //more properties
  }
  
  public class JobApplication
  {
      int Id { get; set; }
      //more properties
  }
  </code></pre>
  
  <p>Repository:
      <code>IQueryable&lt;JobAndUserApplication&gt;  GetJobAndMatchingUserApplication(int userId)</code>:</p>
  
  <pre><code>public class JobAndUserApplication
  {
      public Job Job { get; set; }
      public JobApplication JobApplication { get; set; }
  }
  </code></pre>
  
  <p>Now - Id like to simply do (Project and To are Automapper functionality):</p>
  
  <pre><code>//this allows one efficient query to bring in the subproperties of the composite DTO    
  var jobVmList = jobRepository.GetAllJobsAndMatchingJobApplicationByUser(userId)              
                               .Project()
                               .To&lt;JobVM&gt;()
                               .ToList();
  </code></pre>
  
  <p>So I need a mapping kind of like this:</p>
  
  <pre><code>Mapper.CreateMap&lt;JobAndUserApplication, JobVM&gt;()
        .ForMember(jvm =&gt; jvm, opt =&gt; opt.ResolveUsing(src =&gt; src.Job));
        //many other .ForMembers that are not relevant right now
  </code></pre>
  
  <p>I am attempting to map the Job property of the DTO directly on to the JobVM (which shares many of the same properties).</p>
  
  <p>My mapping throws the following exception:</p>
  
  <p>Custom configuration for members is only supported for top-level individual members on a type.</p>
  
  <p>What am I doing wrong and how can I accomplish the mapping form the Job property of the DTO on the the JobVM itself?</p>
  
  <p>Thanks</p>