title: What exactly does Attach() do in Entity Framework?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3920111/entity-framework-4-addobject-vs-attach">Entity Framework 4 - AddObject vs Attach</a>  </p>
  </blockquote>
  
  
  
  <p>I've seen the use of attach a few times, especially when manipulating models. </p>
  
  <pre><code>using (var context = new MyEntities())
  {
      context.Attach(client);
      context.SaveChanges();
  }
  </code></pre>
  
  <p>From the context it looks like it just runs an <code>UPDATE</code> against a record in EntityFrameworks, but I also see it used in <code>DELETE</code> statements. So I can only assume it just gets a pointer to the database?</p>
  
  <p>Could someone point me in the right direction, I've googled it for a while and whilst I don't come up empty, I can't find any good explinations of what it does (from an overview, and internally). </p>