title: C# Automapper 6.1.1 - Collection/List destination properties loses values Entity Framework 6
body: <p>I have a problem when mapping collections with Automapper 6 and I can't find a solution. In the <code>updatedArticle</code> object below I have the old <code>Created</code> and <code>Updated</code> values left after mapping since they do not exist on the view model. However the values for <code>Created</code> and <code>Updated</code> in Descriptions are lost. The values that do come in via the view model are all updated correctly. What am I doing wrong? Automapper also loses Entity Framework 6 mapping for Article since those values are lost as well.</p>
  
  <p>Controller method:</p>
  
  <pre><code>public async Task&lt;IHttpActionResult&gt; UpdateArticle(ArticleViewModel articleVm)
  {
      Article articleOriginal = await iArticleRepository.GetAsync(articleVm.Id);
      Article updatedArticle = Mapper.Map&lt;ArticleViewModel, Article&gt;(articleVm, articleOriginal);
      return Ok();
  }
  </code></pre>
  
  <p>Mapping:</p>
  
  <pre><code>Mapper.Initialize(cfg =&gt;
  {
      cfg.CreateMap&lt;ArticleViewModel, Article&gt;()
          .ForMember(x =&gt; x.Created, opt =&gt; opt.Ignore())
          .ForMember(x =&gt; x.Updated, opt =&gt; opt.Ignore());
  
      cfg.CreateMap&lt;DescriptionViewModel, Description&gt;()
          .ForMember(x =&gt; x.Created, opt =&gt; opt.Ignore())
          .ForMember(x =&gt; x.Updated, opt =&gt; opt.Ignore())
          .ForMember(x =&gt; x.ArticleId, opt =&gt; opt.Ignore())
          .ForMember(x =&gt; x.Article, opt =&gt; opt.Ignore());
  }
  Mapper.AssertConfigurationIsValid();
  </code></pre>
  
  <p>Viewmodels:</p>
  
  <pre><code>public class ArticleViewModel
  {
      public int Id { get; set; }
  
      public string Name { get; set; }
  
      public List&lt;DescriptionViewModel&gt; Descriptions { get; set; }
  }
  
  public class DescriptionViewModel
  {
      public int Id { get; set; }
  
      public string Heading { get; set; }
  }
  </code></pre>
  
  <p>Models:</p>
  
  <pre><code>public class Article : IEntity&lt;int&gt;
  {
      public Article()
      {
          Descriptions = new List&lt;Description&gt;();
      }
  
      [Key]
      public int Id { get; set; }
  
      public DateTime Created { get; set; }
  
      public DateTime Updated { get; set; }
  
      [MaxLength(256)]
      public string Name { get; set; }
  
      public virtual ICollection&lt;Description&gt; Descriptions { get; set; }
  }
  
  public class Description: IEntity&lt;int&gt;
  {
      [Key]
      public int Id { get; set; }
  
      public DateTime Created { get; set; }
  
      public DateTime Updated { get; set; }
  
      [MaxLength(256)]
      public string Heading { get; set; }
  
      public int ArticleId { get; set; }
  
      public virtual Article Article { get; set; }
  }
  </code></pre>