c# wcf data service Kullanimi (winforms-Northwind db example ) gridcontrol datasource

Uri xuri = new Uri("http://localhost/NortWindservice/dataservice.svc");
ServiceReference1.NorthwindEntities c;
private void Form1_Load(object sender, EventArgs e)
{
try
{
c = new ServiceReference1.NorthwindEntities(xuri);
gridControl1.DataSource = c.Products.ToList();
}
catch (Exception ex)
{
MessageBox.Show("Load" + Environment.NewLine + ex.Message);
return;
}
}

Yorumlar