title: Use AutoMapper to flatten object to int
body: <p>I have the following Map in AutoMapper:</p>
  
  <pre><code>AutoMapper.Mapper.CreateMap&lt;MySourceObject, Int32&gt;()
      .ForMember(d =&gt; d, o =&gt; o.MapFrom(s =&gt; s.Id));
  </code></pre>
  
  <p>I am trying to map the <code>Id</code> property of the source object to just an <code>int</code> as the destination.</p>
  
  <p>Unfortunately, the above gives the following error:</p>
  
  <pre><code>Custom configuration for members is only supported for
                top-level individual members on a type
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>What I am trying to achieve is not having to pass an entire complex object through to the ViewModel when all I need is the <code>Id</code> to bind to a <code>DropDownList</code>, as the returning POSTed form won't recreate the complex object, just return the int.  An <code>int</code> is all I need :)</p>
  
  <p>Now, I could do this myself in code, but then that diminishes the point of having automapper.</p>