Creating the business logic layer

Now, let's create the business logic layer. The steps here are very similar to the steps in Chapter 5, Implementing a Three-layer WCF Service, so you can refer to that chapter for more details:

  1. Right-click on the solution item and select Add | New Project.... Add a class library project with the name NorthwindLogic.
  2. Add a project reference to NorthwindDAL and NorthwindBDO to this new project.
  3. Rename the Class1.cs file to ProductLogic.cs. This will also change the class name and all related places in the project.
  4. Add the following two using statements to the ProductLogic.cs class file:
    using NorthwindDAL;
    using NorthwindBDO;
  5. Add the following class member variable to the ProductLogic class:
    ProductDAO productDAO = new ...

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.