For the business logic project, we need to add a class file, ProductLogic.cs
, and customize it as follows:
using
statements for the BusinessEntities
, and DataAccess
namespaces. GetProduct
, to call the data access layer to retrieve a product from database.The final ProductLogic
class file should look like this:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using MyWCF.EasyNorthwind.BusinessEntities; using MyWCF.EasyNorthwind.DataAccess; namespace MyWCF.EasyNorthwind.BusinessLogic { public class ProductLogic { ProductDAL productDAL = new ProductDAL(); public ProductEntity GetProduct(int id) { return productDAL.GetProduct(id); } } }
Build the business logic project, to make sure that there is no build error.