title: How to access old entity value in ASP.NET Entity Framework
body: <p>I have a small ASP.Net mvc3 application and I am on the edit part. I have the default template:</p>
  
  <pre><code>public ActionResult Edit(int id)
  {
      User user = db.Users.Find(id); 
      return View(user);
  }
  
  public ActionResult Edit(User user)
  {
      //(Here access to old user name for example)
      db.Entry(user).State = EntityState.Modified;
      db.SaveChanges();
  }
  </code></pre>
  
  <p>If i do user.name I have the new value but I want to access the db value before the save.</p>
  
  <p>Thanks !</p>