Click here to Skip to main content
15,884,177 members
Articles / Web Development / ASP.NET

CRUD operations in Siverlight using ADO.NET Data Service

Rate me:
Please Sign up or sign in to vote.
4.77/5 (12 votes)
10 Feb 2008CPOL8 min read 118.1K   784   76  
The simplest way to do CRUD (Create, Retrieve, Update, Delete) operations in Silverlight using ADO.NET Data Service (Astoria).
<Canvas x:Name="parentCanvas"
        xmlns="http://schemas.microsoft.com/client/2007" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        Loaded="Page_Loaded" 
        x:Class="SilverlightProject1.Page;assembly=ClientBin/SilverlightProject1.dll"
        Width="640"
        Height="480"
        Background="White"
        >
  <Canvas x:Name='insert' Background='Red' Width="640"
          Height="100" Canvas.Top="0">
    <TextBlock x:Name="insertTextBlock" Text ="Click me to insert the record" Canvas.Top="34" Width="640" />
  </Canvas>
  <Canvas x:Name='delete' Background='Yellow' Width="640"
        Height="100" Canvas.Top="100">
    <TextBlock x:Name="deleteTextBlock" Text ="Click me to delete the record" Canvas.Top="34" Width="640" />
  </Canvas>
  <Canvas x:Name='update' Background='Blue' Width="640"
        Height="100" Canvas.Top="200">
    <TextBlock x:Name="updateTextBlock" Text ="Click me to update the record" Canvas.Top="34" Width="640" />
  </Canvas>
  <Canvas x:Name='view' Background='Green' Width="640"
        Height="100" Canvas.Top="300">
    <TextBlock x:Name="viewTextBlock" Text ="Click me to view the record" Canvas.Top="34" Width="640" />
  </Canvas>
</Canvas>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Singapore Singapore
Michael Sync is a Microsoft MVP for Silverlight and a member of Microsoft WPF/Silverlight Insider Team.

Please find more details about me in my blog.

Comments and Discussions