title: Mapping an EntityObject to POCO and back in WCF RIA services causes duplicate child entities
body: <p>I created a complete Visual Studio 2010 solution that can reproduce the issue here:</p>
  
  <p><a href="http://dl.dropbox.com/u/42317133/WcfRiaAutoMapper.zip" rel="nofollow">http://dl.dropbox.com/u/42317133/WcfRiaAutoMapper.zip</a></p>
  
  <ol>
  <li>Build the solution.</li>
  <li>Run the unit test in the test project to deploy the database.</li>
  <li>Debug the SilverlightApplication1 project</li>
  <li>Click on the "Click me" button.</li>
  <li>Notice that two Authors are added to the Authors database table when only one was expected.</li>
  </ol>
  
  <p>The problem exists during the mapping in the InsertPost method in BlogService.cs in the "RIAServicesLibrary1.Web" project.</p>
  
  <p>If I comment those two lines out, then it works as expected.</p>
  
  <p>Any ideas?</p>
  
  <p>This happens with both AutoMapper 1.1 and AutoMapper 2.0.0</p>
  
  <p>Thank you very much.</p>
  
  <p>This is re-post of the issue submitted here:<br>
  <a href="https://github.com/AutoMapper/AutoMapper/issues/165" rel="nofollow">https://github.com/AutoMapper/AutoMapper/issues/165</a></p>