Yes, we do have tutorials and some code samples for more robust saving and exception handling.
We were trying not overwhelm the example with all of the stuff you can do in a real application, including:
- Check for "nothing to save"
- Validate all entities that are about to be saved (client-side, server-side, or both)
- Process and respond to the several types of exceptions that might be reported (lost connection, concurrency violation, unexpected database integrity or schema complaints (oops!), ...)
- Raise EventAggregator event identifying saved/deleted entities that other modules might care about
In industrial code, I end up with quite a few PersistenceService helper classes to carry this load. It's a bit much to stuff into a Model Explorer / Prism Explorer and, frankly, we were concerned that, if we included it in our sample, people would conclude that DevForce itself is too complicated.
It is not DevForce that is complicated. It is the requirement that is complicated.
If you look around ... check out any magazine article or any vendor's code samples ... you will observe that these concerns are never addressed. They are alluded to but no one wants to reveal these aspects of the sausage factory.
On the other hand, I don't want you to have to re-invent the machinery that we've already got stashed in the back room.
I'm not prepared to do a big scrub and public presentation of this topic just yet. Do ping our support team if you want a copy of the code "as is". The machinery isn't beautiful and well documented ... but it exists ... and we'll share it with you ... as long as you are prepared to regard it as a point of departure for your own work.
Finally, a word about the "one async operation at a time" comment. Most applications don't need to stack up a bunch of queries that are processed collectively. DevForce has some pretty cool support for this kind of thing - both parallel and serial async operations (with inter-operation dependencies and exception handling). We didn't want to burden this sample code with them. We can start a new thread to discuss such feature if you like.