Persisting a Unit of Work/changeset

In various Line of Business applications, it's important that changes can be persisted to our datastore in one go. Imagine you have a DataGrid containing products and lines of detail for each product. In such a case, it's important that these entities are persisted together in one go as saving a detail line of a product when the product itself hasn't been saved will result in an error. In this recipe, we'll learn what we should do to persist the data we've changed on our DomainContext to our datastore. Instead of submitting a change to an Entity when it has been changed, this recipe will show you how to submit a Unit of Work/changeset, which can consist of multiple changed, added, or deleted entities.

Getting ...

Get Silverlight 4 Data and Services Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.