Creating the service interface layer

In the previous section, we created a WCF project by using the WCF Service Library template. In this section, we will create the service interface layer contracts.

As two sample files have already been created for us, we will try to re-use them as much as possible. Then we will start customizing these two files to create the service contracts.

Creating the service interfaces

To create the service interfaces, we need to open the IService1.cs file and do the following:

  1. Change its namespace from RealNorthwindService to MyWCFServices.RealNorthwindService.
  2. Right-click on the class name IService1, select Refactor | Rename, and then change the interface name from IService1 to IProductService as shown in the following ...

Get WCF 4.5 Multi-Layer Services Development with Entity Framework now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.