Exception during SaveAsync and Query<>

Dec 12, 2010 at 3:44 PM

I try to edit some data in Page2 (Details View) coming from a ListView of the same data (Page1).

Going back to Page1 will save the changed data of page2 via SaveAsync (in the NavigatedFrom event).

The problem now is an Exception (IsolatedStorage invalid operation) during the loading of Page1.

It seems that the save operation is still in progress while the Page1 will try to populate the data from the database (which seems to be not finished yet).

If I use the synchronous save - all is perfect...

Is it "forbidden by design" the saveasync and immediately retrieve data from the same table (possibly with complete deserialisation via lazyload.value)? That would make the usage of Async rather difficult as I could only leave the page until the async request is completed...

Coordinator
Dec 13, 2010 at 12:33 PM

It's not forbidden by design, but it is a feature that hasn't been fully fleshed out. I'm going to be testing this further and either introduce a locking mechanism or deprecate that for the next release. It may make more sense to have you handle the background process instead of Sterling to accommodate for these types of conflicts. The async in conjunction with the IWorkflow from Jounce might be one of the combinations you are looking for, but I'll keep you posted.