title: Get the model update the Id
body: <p>In entity framework when you commit a new item it does not get his id updated according to the database. For example:</p>
  
  <pre><code>public class A  {
      public int Id {get; set;}
      public DateTime LastUpdateUtc {get; set;}
  }
  </code></pre>
  
  <p>Now when I add a new  A to my repository:</p>
  
  <pre><code>A a = new A();
  a.LastUpdateUtc = DateTime.UtcNow;
  repo.Add(a);
  repo.SaveChange();
  a.Id; // still == 0
  </code></pre>
  
  <p>Even if I search for the eleement in my repository I get an A but the Id is still equal to 0.</p>
  
  <pre><code>A a = repo.Asquerable().OrderByDescending(a =&gt; a.LastUpdateUtc ).First();
  a.Id; // still == 0
  </code></pre>
  
  <p>Does someone know how do I tell entity framework to update the Id feild from what the database have compute?</p>
  
  <p>Thanks</p>