This article will briefly describe how to invoke ado.net Data Services in Silverlight 2.
Prepare knowledge
Since Ado.net Data Services is in ASP.net 3.5 extensions, first install the latest version of ASP.net 3.5 extensions, which you can download from here, before starting this example. After the installation is complete, you should be able to see the Ado.net Data Service entry in the Add New Item dialog box:
The Ado.net data service allows applications to expose data as services so that we can access the data directly through the browser, which supports open industry standards such as ATOMPUB and JSON. It supports standard HTTP actions such as post, get, put, and delete to complete the creation, updating, deletion, and reading of data. The knowledge of the Ado.net data Service there is no more to say, you can see the relevant information.
Simple example
If you look at the previous three articles, it may be annoying for the following interface, but in this article I will still use this example to demonstrate:
After the Silverlight 2 project is established, we add a post class to the Web project:
public class Post
{
public int Id { get; set; }
public string Title { get; set; }
public string Author { get; set; }
}