For anyone who has been paying attention, Microsoft has announced a fair number of changes and new things for us to play with over the past few weeks, suspiciously all surrounding the PDC conference in LA.  One of the biggest announcements was the Silverlight 4 beta, which I know we're all anxiously playing with, but the other was the (much needed) overhaul to .Net RIA Services, which has been re-branded as WCF Ria Services.

So what's in a new name?  Well a host of improvements, but our friend Brad Abrams covered that more than well in his Welcome to WCF RIA Services Beta post, so I won't go re-inventing the wheel and repeating him.  All I can say is - WOW!  Microsoft really listened to a lot of the issues that people (myself included) had with the previous .Net RIA Services and we have a much more mature product to work with now.

In the name of staying on top of our game, Telerik is pleased to inform everyone that as usual, we've got you covered when it comes to WCF RIA services.  Our controls are still fully compatible with this technology and our latest Q3 2009 SP1 release is actually built using the latest beta version (for those of you using previous releases, they were built with the July Preview, which Microsoft has redirected all links for so you're forced to use the new one ;) ).  Just to prove I'm not lying to you, I worked up a quick and easy example using RadGridView and WCF RIA Services (and Linq to SQL!).

You can download the sample project from the bottom of the post or just follow along here... and for reference, I'm using VS2008 for this since I'm on my main development machine, and as Tim Heuer pointed out you cannot have the VS2008 and VS2010 RIA Services installed side-by-side, but this works the same in VS 2010 (did I mention that as of the Q3 2009 SP1 release our controls are compatible with VS2010 Beta 2?). 

  1. Start a brand new Silverlight 3 Application
  2. Check to enable WCF Ria Services on the second window
  3. Now that your project is set, add some RadControls:
    RadGrid XAML setup
  4. Create a DataContext in your .Web application, build, then create a new Domain Service Class and choose the tables you want (and editing options):
    Adding a new Domain Service Class
  5. Build again. :)
  6. Add a using statement to your .Web application in your SL app
  7. Add a reference to your context and load up some data:
    Loading some data
  8. Enjoy the results:
    Happy WCF RIA'd RadGridView

So as you can see, it isn't nearly as scary as you thought to get into WCF Ria Services and to start using them with your latest and greatest RadControls for Silverlight Q3 2009 SP1 release today.

And here is a copy of the project so you can see for yourself.  I'm using Northwind so you may have to play with the connection string in your .Web project.

Enjoy!

P.S.- For anyone on the bleeding edge and wants to play with this using our new Silverlight 4 build of RadControls for Silverlight, check out this version which is using VS2010 + SL4 + Telerik RadControls for Silverlight 4 CTP + WCF RIA Services beta for VS2010.  :)


About the Author

Evan Hutnick

works as a Developer Evangelist for Telerik specializing in Silverlight and WPF in addition to being a Microsoft MVP for Silverlight. After years as a development enthusiast in .Net technologies, he has been able to excel in XAML development helping to provide samples and expertise in these cutting edge technologies. You can find him on Twitter @EvanHutnick.

Related Posts

Comments

Comments are disabled in preview mode.