Doing CRUD Operations in Silverlight 2 Against ADO.NET Data Services
Many of us have been struggling to create business-oriented (LOB) forms using Silverlight 2 and ADO.NET Data Services. There are plenty of community samples on reading data, but a dearth of real-world content on creating and updating records.
The Silverlight SDK team has been paying attention to the community feedback and posted some tutorials on doing CRUD with Silverlight 2. Good work, team!
I've successfully completed two of the tutorials - creating a data model and inserting data. However, beware of the cross domain security issues. If you get a JavaScript 'Access Denied' error, be sure you're hosting the Silverlight web application and the data service (.svc) on the same domain. Let's hope a Silverlight update can remedy that issue (securely) some day.
Here are some tutorial/documentation URLs of note for Silverlight 2 developers:
- ADO.NET Data Services (Silverlight)
- Create a data model and ADO.NET data service that can be used by applications for Silverlight
- Access ADO.NET Data Services and bind data to Silverlight's user interface controls
- How Silverlight can insert new instances of data that is defined and deployed by ADO.NET Data Services.
- How Silverlight can modify or delete data that is deployed by ADO.NET Data Services
- How Silverlight can navigate associations between data
- How Silverlight can create new instances of associations that are defined by the ADO.NET Entity Data Model.