Articles → Silverlight → WCF RIA Service

WCF RIA Service






Software Requirement




  1. Visual studio 2010 is installed on your machine.
  2. WCF RIA Services SP2 for Silverlight 4 and 5 are installed on your machine.
  3. WCF RIA Services Toolkit is installed on your machine.

Prerequisite Knowledge




  1. How ASP.NET application works?
  2. What is XAML file?
  3. How to bind a silverlight control like combobox from a datasource?
  4. What is ADO.NET entity model?
  5. How to query to data source using LINQ?
  6. What is IEnumerable and IQueryable interfaces?

ASP.NET Application Vs Silverlight Application


Picture showing how the application is layered in traditional web application
Click to Enlarge



Picture showing how the application is layered in silverlight application
Click to Enlarge




Creation Of A New Project




Picture showing creating a new project of type silverlight application
Click to Enlarge



Picture showing selecting the version of silverlight and enabling WCF RIA service
Click to Enlarge





Picture showing the project structure in the solution explorer of the visual studio
Click to Enlarge


Add Data Tables




Picture showing the data in category and books table
Click to Enlarge




Add ADO.NET Entity Data Model




Picture showing a window to add the Add ADO.NET entity data model in the project
Click to Enlarge



Picture showing the window to select model contents
Click to Enlarge



Picture showing a window to select the data source
Click to Enlarge



Picture showing the database objects of the selected data source
Click to Enlarge







Picture showing the new data model added in the web application
Click to Enlarge


Adding A Domain Service Class




Picture showing adding the domain service class in the project
Click to Enlarge



Picture showing the popup window to specify the domain service class name
Click to Enlarge








Domain Service Code


Picture showing the autogenerated code of the domain service class
Click to Enlarge






Adding Code In Xaml File


Picture showing adding the code in the MainPage.xaml file
Click to Enlarge






Calling RIA WCF Service Through Code Behind


Picture showing how to call RIA WCF service through code behind
Click to Enlarge










Output


Picture showing the output of WCF RIA service
Click to Enlarge


Conclusion





WCF Vs WCF RIA Service





Posted By  -  Karan Gupta
 
Posted On  -  Thursday, January 19, 2012

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250