Creating a WCF Service

Now that you’ve seen the standard WCF service project template, it’s time to walk through creating a WCF service with Visual Studio 2010. For this example, we develop a WCF version of the CustomerProfile service we created earlier in the ASP.NET web service section. Like that service, this service accesses the Customer object defined back in a BusinessEntities library (Listing 22.1) and the EntityServices implementation code (Listing 22.2). The latter provides methods to retrieve customer information from a data store and save changes to that information. The following steps outline the process of exposing this functionality as a WCF service:

1. Start by creating a new WCF Service Application project. Name the project, ...

Get Microsoft® Visual Studio® 2010 Unleashed 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.