Creating the Client Application
Once you have created the Server Application, you may start developing the Client one.
To display the data from the WCF Data Service, create a new WPF application with a data source that is based on the service. Later in this walk-through, you will add data-bound controls to the application.
Create a new WPF application.
Generate the client code for a service of your choice. For this tutorial we are going to use the http://services.odata.org/Northwind/Northwind.svc service. Name the generated file "NorthwindEntities".
Add a new class inside the project and replace its declaration with the one demonstrated in Example 1.
Example 1: Defining the context
public class MyNorthwindContext : NorthwindEntities
{
public MyNorthwindContext() : base(new Uri("http://services.odata.org/Northwind/Northwind.svc", UriKind.Absolute)){}
}
Public Class MyNorthwindContext
Inherits NorthwindEntities
Public Sub New()
MyBase.New(New Uri("http://services.odata.org/Northwind/Northwind.svc", UriKind.Absolute))
End Sub
End Class