Implementing the HelloWorldService service contract

Now that we have defined a service contract interface, we need to implement it. For this purpose, we will re-use the empty class file that Visual Studio created for us earlier and modify it to make it the implementation class of our service.

Before we modify this file, we need to rename it. In the Solution Explorer window, right-click on the Class1.cs file, select Rename from the context menu, and rename it as HelloWorldService.cs. Visual Studio is smart enough to change all the related files that are references to use this new name. You can also select the file and change its name from the Properties window.

Next, perform the following steps to customize the class file:

  1. Open the HelloWorldService.cs ...

Get WCF Multi-layer Services Development with Entity Framework Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.