title: Update existing object with new values
body: <p>I was wondering how you could update an existing object with new values. I have a simple account object with the following properties</p>
  
  <pre><code>public class Account
  {
      public int Id {get; set;}
      public string Forename {get; set;}
      public string Surname {get; set;}
      public DateTime RegisterDate {get; set;}
      public string Occupation {get; set;}
  }
  </code></pre>
  
  <p>In my project I have a simple edit method which allows a user to update their Forename, Surname and Occupation.</p>
  
  <pre><code>public ActionResult Edit()
  {
       return View();
  }
  
  [HttpPost]
  public ActionResult Edit(Account editFormDetails)
  {
      var accountDetails = GetAccountDetails(account.Id) //Gets a users existing details from db
  
      return RedirectToAction("Index");
  }
  </code></pre>
  
  <p>Is there a nice way of updating the existing object(accountDetails) with the new values from the editFromDetails object? I would do clone, however, the fields in my edit form can be left empty, so I may not need to update. I've simplified my object in this example to make it less verbose. Any help would be great.</p>