Book Image

WCF Multi-layer Services Development with Entity Framework - Fourth Edition

By : Mike Liu
Book Image

WCF Multi-layer Services Development with Entity Framework - Fourth Edition

By: Mike Liu

Overview of this book

Table of Contents (20 chapters)
WCF Multi-layer Services Development with Entity Framework Fourth Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Hosting the HelloWorld WCF Service
Index

Testing the RESTful WCF service with a C#/XAML client


Next, we will create two clients to test the RESTful WCF service. We will create a C#/XAML client to call the RESTful WCF service from the code behind the C# class and create another client to call the RESTful WCF service in JavaScript with jQuery and WinJS. We will create these two clients as Windows 8.1 apps. If you don't have Windows 8.1, you can create the first client as a WPF application, and the second client as an ASP.NET application in Windows 7.

Creating the C#/XAML client

First, let's create a C#/XAML client to call the RESTful WCF service from the code behind the C# class. You can follow these steps to create this client:

  1. From the Solution Explorer, right-click on the solution item and add a new project. Go to Visual C# | Store Apps | Windows Apps | Blank App (Windows) as the template, change the name to RESTNorthwindClientXAML, and leave the location to be the default one (C:\SOAwithWCFandEF\Projects\RESTNorthwind).

  2. You might...