Persisting data to the server

When you're designing a Line of Business application, one of the typical requirements is making sure that the user is able to save the changes they make back to their datastore. This recipe will show you what you should do to persist data you've changed on your client's DomainContext to your datastore.

Getting ready

This recipe uses the AdventureWorks Lite database—a free database you can download from http://www.codeplex.com/MSFTDBProdSamples. To follow this recipe, you need to have this database installed on an SQL Server instance you can access from your machine.

We're starting from the solution completed in the Getting data on the Client recipe. You can find a starter solution located in the Chapter09\Persisting_Data_Starter\ ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.