Book Image

WCF Multi-layer Services Development with Entity Framework - Fourth Edition

By : Mike Liu
Book Image

WCF Multi-layer Services Development with Entity Framework - Fourth Edition

By: Mike Liu

Overview of this book

Table of Contents (20 chapters)
WCF Multi-layer Services Development with Entity Framework Fourth Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Hosting the HelloWorld WCF Service
Index

Creating the business domain object project


In Chapter 5, Implementing a Three-layer WCF Service, we created a business domain object (BDO) project to hold the intermediate data between the data access objects and the service interface objects. In this section, we will also add such a project to the solution for the same purpose.

  1. In the Solution Explorer, right-click on the LINQNorthwind solution.

  2. Select Add | New Project... to add a new class library project named NorthwindBDO.

  3. Rename the Class1.cs file to ProductBDO.cs. This will also change the class name and all related files in the project.

  4. Add the following properties to this class:

    • ProductID

    • ProductName

    • QuantityPerUnit

    • UnitPrice

    • Discontinued

    • UnitsInStock

    • UnitsOnOrder

    • ReorderLevel

    • RowVersion

The following is the code list of the ProductBDO class:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NorthwindBDO
{
    public class ProductBDO
    {
        public int ProductID...