Using Contract First development

Contract First development comes to us in .NET 4.5 WCF as the ability to create the service interface and data contract from a WSDL file. The WSDL file is generated in the svcutil.exe application with the /servicecontract flag.

This provides an excellent way to parallelize development since we can work on the backend service while it is being constructed, given that the service requirements and contract have been defined beforehand.

In this recipe, we will see how to use this new feature.

Getting ready

In order to use this recipe, you should have Visual Studio 2012 installed and a WSDL contract. For this recipe, we will use the dynamically generated web service we implemented in the first recipe.

How to do it...

In this ...

Get Microsoft .NET Framework 4.5 Quickstart Cookbook 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.