I had the following problem with WCF RIA services: I have a Client table and an Address table . A client can have 0 ... n addresses. There is a form for editing a client, with a Datagrid that displays addresses. You add / edit the address in the child window by clicking the "Add / Edit" button. Now here is what:
The problem is that the user should always be able to discard the changes. This is not a problem except . If you create a new client and add the address to this client, you want to edit the address, but want to change the cancel .
- You cannot execute RejectChanges in context because it will delete the address with the client.
- You cannot use separate contexts because then you cannot establish the relation of a foreign key.
How do you guys solve this?
Luetm source
share