Generating the source code

At this point, we have finished modeling the WCF service. So, we can now generate the source code. Follow these steps to generate the source code for the new WCF service:

  1. Add WCF Implementation Projects to the solution, with MyWCF.LINQNorthwind as the Project name. Service Factory should generate ten projects for you, including service interface layer projects, business logic layer projects, and data access layer projects.
  2. Link both the service contract and data contract models, to the projects by setting the value of the model's property Project Mapping Table to be MyWCF.LINQNorthwind.
  3. Validate the data contract and the service contract models.
  4. Generate source code for all of the projects from the data contract and service contract models.

At this point, you should have the source code generated for the service interface layer projects. The detailed steps are same as described in Chapter 7, so you can refer back to that chapter for more information and screenshots if necessary.

Next, we will implement the data access layer of the service with LINQ to SQL, and then implement the business logic layer of the service. Many steps in the following sections are similar to those described in Chapter 8, with a few differences that we will discuss in detail.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset