title: WCF Data Service Change Tracking: How to cancel save changes and revert to original values for an object
body: <p>I have a WCF Data Service that is wrapping an Entity Framework 4 data model. I am connecting a WPF client to the service using the WCF Data Services Client library.</p>
  
  <p>Is it possible in WCF Data Services to undo / cancel changes to tracked objects ?</p>
  
  <p>scenario : In the UI I allow a user to edit an object. I have save and cancel buttons. If the user chooses to save I call SaveChanges() on my WCF context and changes are sent to the database via the WCF service. If the user clicks cancel I want to undo the changes and revert to the original property values of the current object.</p>
  
  <p>I know that the WCF data services client library has change tracking built in - but I cannot find any way at accessing this information.</p>
  
  <p>In Entity Framework the context supports the Refresh method and you can specify RefreshMode.StoreWins and pass in the object - this will effectively cancel / undo any changes.
  documented here  : <a href="http://msdn.microsoft.com/en-us/library/bb896255.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/bb896255.aspx</a></p>
  
  <p>Any suggestions on how I can achieve the same thing in WCF DataServices in my client application ?</p>
  
  <p>cheers
  Chris</p>