title: Update check' issue when updating an entity using DataContext Attach method
body: <p>I'm trying to create an update method in a generic repository as a LINQ to SQL data access layer.</p>
  
  <p>I have an entity like this:</p>
  
  <pre><code>[Table]
  public class Product
  {
      [Column(IsPrimaryKey = true, IsDbGenerated = true, 
       DbType = "Int NOT NULL IDENTITY")]
      public int Id { get; private set; }
      [Column(UpdateCheck = UpdateCheck.Never)]
      public string Name { get; set; }
      ....
  }
  </code></pre>
  
  <p>I set <code>Update Check = true</code> for all the fields exept for the id as @jeff Atwood suggests in <a href="https://stackoverflow.com/questions/330053/how-much-overhead-does-update-check-have-for-linq-updates">this post</a> and I set the <code>asModified</code> propery in the attach method to true which i found in <a href="https://stackoverflow.com/questions/536400/entity-attachment-issues-in-linq">this post</a> as following:</p>
  
  <pre><code>public void Update(T entity)
  {
      _db.GetTable&lt;T&gt;().Attach(entity, true); 
      _db.SubmitChanges();
  }
  </code></pre>
  
  <p>but I keep getting the same exception:</p>
  
  <blockquote>
    <p>An entity can only be attached as modified without original state if
    it declares a version member or does not have an update check policy.</p>
  </blockquote>
  
  <p>So what's the problem ???</p>
  
  <p>Do you recommend any other approaches to create an update method in a generic repository except creating a timestamp column as a version number.</p>