Silverlight 4 + RIA Services - Ready for Business: Consuming Data in the Silverlight Client
To continue our series , let’s see where the fun comes in my look at how easy that is to consume from the client. First just to help you understand what is happening behind the covers, let’s look at a code-behind solution. In View\Home.xaml put a simple DataGrid on the form. < sdk : DataGrid Name = "dataGrid1" Height = "152" Width = "692" /> Then add these lines of code to Home.xaml.cs 1: var context = new DishViewDomainContext(); 2: this .dataGrid1.ItemsSource = context.Restaurants; 3: 4: context.Load(context.GetRestaurantsQuery()); 5: In line 1, we create a DishViewDomainContext… notice this is the automatically generated (via an MSBuild task) from the DishViewDomainService on the
Read More...
Read the complete post at http://blogs.msdn.com/brada/archive/2010/03/15/silverlight-4-ria-services-ready-for-business-consuming-data-in-the-silverlight-client.aspx