Last post Nov 04, 2013 07:55 AM by Illeris
Nov 03, 2013 03:26 AM|giangnt|LINK
I'm making an 3-layer ( BLL, DAL, and MVC as presensation ).
My question is. I'm building an BLL for Category manager named CategoryBLL. It have an method to delete Category, when delete an Category it also delete all it own's Products ( I also have an BLL for Product entity ).
So, We have to action, delete product then delete category . This two actions
called in Delete() method in CategoryBLL. My question is. The method delete product by CategoryID [ DeleteProduct(int categoryID) ] I should keep in CategoryBLL or ProductBLL ?
If we put in ProductBLL, I think it very easy to reuse codes, easy to tracking all code work with Product entity. But when we work in a team coding. But, The team build CategoryBLL have to wait for ProductBLL team create the delete Method DeleteProductByCategoryId
then they call in their CategoryBLL. So our Project is not finished quick.
Nov 04, 2013 07:55 AM|Illeris|LINK
Following the logic you described, I'd put it in the productBLL. Yes, there is a link with cagtegories, but only at dbase level not at business logic level. At BLL you nearly delete products.