|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Navigation;
using System.Windows.Shapes;
using SilverlightWCFRIA.Web;
using System.ServiceModel.DomainServices.Client;
namespace SilverlightWCFRIA
{
public partial class ShowData : Page
{
StudentDomainContext objctx;// StudentDomainContext class in the generated code acts as the "proxy" to communicate from the Silverlight client to the domain service
public ShowData()
{
InitializeComponent();
objctx = new StudentDomainContext();//creating the instance of DomainContext corresponding the StudentDomainService
EntityQuery<student> query = objctx.GetStudentsQuery();//passing the query to EntityQuery
LoadOperation<student> loadOp = this.objctx.Load(query);
studentgrid.ItemsSource = loadOp.Entities;//setting the Itemsource of DataGrid to the entities loaded.
}
// Executes when the user navigates to this page.
protected override void OnNavigatedTo(NavigationEventArgs e)
{
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Working as a Web Developer.
Currently using WPF for development.
Having Experience in C#,SilverLight,Asp.net/Sql Server.