I'm working on a WPF 4/Entity Framework 4 (self tracking entities) application. As a proof of concept, I'm creating a fairly simple UI that's bound to an EF entity.
Our users want to be able to edit the entity, but have the option to accept or reject several sets of changes without saving to the database until later when they are ready. For example, the user can make one set of modifications to the entity and then "accept the changes" (but not save). The next set of modifications made by the user might be "rejected." In this case, the entity would be reverted to the state it was in the last time changes were accepted. The user could then make even more modifications to the entity, but this time, save to the database. The 2nd set of modifications would not be included as they were rejected...
I'm thinking about using the OriginalValues collection, but as the name suggests, it only provides the original values for each field. I'm sure I could write some custom code to Clear the OriginalValues collection when changes are accepted and then revert to the OriginalValues when changes are rejected.
I'm just brainstorming at this point. Has anyone done anything like this? Are there any good examples?
Thanks a bunch!