I have a web application that allows the clerk to edit information. I copy an entity before the edit starts in case the user decides to cancel the changes. The problem is that any changes made on the copy is applied to the original object.
In C# I would create a deep copy to avoid that issue, but this application is using Entity Framework... I am not sure how to do a deep copy of an entity.
Here is more details on my problem... I am still trying to resolve.
I have a xaml screen with a grid binded to a list of inventory items. The items are an EntitySet. When I want the user edits one of the items, I copy the values of the current entity in an object "EntityToEdit" of the same type. The user makes a change, saves, and the list is automatically refreshed with the changes.
The problem occurs when the user selects another item to edit. That second item is somehow changed with the changes made on the first item....
How can I break the "link"?!?