title: Automapper - can it map over only existing properties in source and destination objects?
body: <p>I have a simple update function:</p>
  
  <pre><code>public void Update(Users user)
  {
      tblUserData userData = _context.tblUserDatas.Where(u =&gt; u.IDUSER == user.IDUSER).FirstOrDefault();
      if (userData != null)
      {
          Mapper.CreateMap&lt;Users, tblUserData&gt;();
          userData = Mapper.Map&lt;Users, tblUserData&gt;(user);
          _context.SaveChanges()
      }
  }
  </code></pre>
  
  <p>userData is an EF entity, and it's Entity Key property gets nulled out because, I believe, it exists in the destination object, but not in the source object, so it gets mapped over with its default value (for the Entity Key, that's null)</p>
  
  <p>So, my question is can Automapper be configured to only attempt to map the properties that exist in both the source and destination objects? I'd like things like the Entity Key and navigation properties to be skipped over.</p>