title: Update record using MySQL, Entity Framework + Ext.NET
body: <p>I have a snippet of code that I can't quite get to work:</p>
  
  <pre><code>StoreDataHandler dataHandler = new StoreDataHandler(HttpContext.Request["data"]);
  ChangeRecords&lt;ChequeDiary&gt; data = dataHandler.ObjectData&lt;ChequeDiary&gt;();
  
  foreach (ChequeDiary item in data.Updated) {
      db.ChequeDiaries.Attach(item);
      db.Refresh(System.Data.Objects.RefreshMode.ClientWins, item);
  }
  </code></pre>
  
  <p>This is meant to get the changes and update the underlying object but when I call </p>
  
  <pre><code>db.SaveChanges();
  </code></pre>
  
  <p>.. nothing is updated. If I use:</p>
  
  <pre><code>foreach (ChequeDiary item in data.Updated) {
      ChequeDiary obj = db.ChequeDiaries.FirstOrDefault(o =&gt; o.Id == item.Id);
      obj.BankedAmount = item.BankedAmount;
  }
  </code></pre>
  
  <p>and explicity set each property, it works. Why?!</p>