title: Automapper: how to map nested object?
body: <p>I am struggling with the Automapper syntax.
  I have a List of PropertySurveys, each containing 1 Property.
  I wish to map each item on the collection into a new object which combines the 2 classes.</p>
  
  <p>So my code looks like;</p>
  
  <pre><code>            var propertySurveys = new List&lt;PropertyToSurveyOutput &gt;();
              foreach (var item in items)
              {
                  Mapper.CreateMap&lt;Property, PropertyToSurveyOutput &gt;();
                  var property = Mapper.Map&lt;PropertyToSurvey&gt;(item.Property);
                  Mapper.CreateMap&lt;PropertySurvey, PropertyToSurveyOutput &gt;();
                  property = Mapper.Map&lt;PropertyToSurvey&gt;(item);
                  propertySurveys.Add(property);
              }
  </code></pre>
  
  <p>My simplified classes look like;</p>
  
  <pre><code>public class Property
  {
      public string PropertyName { get; set; }
  }
  
  public class PropertySurvey
  {
      public string PropertySurveyName { get; set; }
      public Property Property { get; set;}
  }
  
  public class PropertyToSurveyOutput
  {
      public string PropertyName { get; set; }
      public string PropertySurveyName { get; set; }
  }
  </code></pre>
  
  <p>So in the PropertyToSurveyOutput object, after the first mapping PropertyName is set. Then after the second mapping PropertySurveyName is set, but PropertyName is overridden to null.
  How do I fix this?</p>