title: How to ignore properties in Entity Framework 6 for Update?
body: <p>I am currently trying to update using <em>Entity Framework 6</em> and am having some trouble ginven a <strong>PK</strong> property in my DB, which I DONT want to edit but cant find the correct way to ignore it. </p>
  
  <pre><code>myobj aux = new obj(){
  //code
  };
  
  using (var context = new ModelEntity())
  {
      var item = context.mytable.Find(id);
       context.Entry(item).CurrentValues.SetValues(aux);
       context.SaveChanges();
  }
  </code></pre>
  
  <p>I get the error: The property 'xxxx' is part of the object's key information and cannot be modified. '</p>
  
  <p>I have searched for some kind of ignore and have found nothing.
  All I find are EF4  and 5.</p>