I have been developing with the OData client for Windows Phone 7 and have just tried to use the DataServiceState.Save() function to try to keep my Context during tombstoning. My WebService is providing a fairly large and complex collection of business object
which contains circular references (eg Invoice has collection of invoice lines and invoiceline has reference to its invoice).
When I called DataServiceState.Save() during an application deactivation (clicking the Start/Home button) I noticed that the process was taking a long time. Broke out the debugger and connected to have a look, and the out stream was up to 100meg (I had maybe
5 invoices loaded). Upon further investigation it seems that the DataContractSerializer in WP7 cannot handle circular references.
Does anyone have any suggestions on how to go about resolving this issue as I don't really want to have to download my data each time the App wakes up.