Silverlight 5 WCF RIA Services - Part 1:
In this article we are going to explore the WCF RIA Services with
Silverlight 5. Let's start with the basics for the first timers.
Create a new SL project as shown below:
Note the DLLs that are added when you enable WCF RIA Service support .
In the web project Add New Item . Add a Data Model as shown below :
Then Build the Solution . It is necessary you give it a build otherwise
when we create a Domain Service , the Data Model would not be
recognised by the Domain Service .
Creating a Domain Service :
In the Web project , add a Domain Service .
Add new Domain Service class Dialog appears . Select the Article Entity .
A couple of classes are generated as shown below :
Give it a Build again .
Go to the Data Menu and click Show Data Sources .
Data Sources Panel should now show the DataDomainContext . Under that Article .
Select the Article and a drop down appears . say Customize as shown below :
Go ahead and attach the DataGrid Control to the Data Source . You could select themes as well.
Notice the change in the icon .
Now go to the Design Screen . Simply drag and drop the entity into the
MainPage layout area . A datagrid should be added automatically now .
Make sure AutoGenerateColumns="True" .
Build and Run it.
In the next post we will check out some advanced concepts in WCF Ria Services . Till then Happy Coding .