Home  /  Questions  /  Question



49   0
Feb 25, 2014


Found an error in Pattern in Action project.

Hi

I found an error in Pattern in Action, at Service Layer, Service.cs:

// Product Services
public Product GetProduct(int productId)
{
        var product = productDao.GetProduct(productId);
        if (product.Category == null)
        product.Category = categoryDao.GetCategoryByProduct(productId);
        return product;
}

product.Category is never null, and in producDao.GetProduct(productId) it also get Category of Product. Edit: 

public Product GetProduct(int productId)
{
        var product = productDao.GetProduct(productId);
        return product;
}

And one Error in Pattern in Action, WinForms: Validate in Bussiness Object wasn't used in Presenter to validate input data.



 

 



508   99.9
Feb 27, 2014
Thanks Thanh. We will review and correct in the next release.