public ProductCategory Add(ProductCategory productCategory) { if (_productCategoryRepository.CheckContains(x => x.Name == productCategory.Name)) { throw new NameDuplicatedException("Tên danh mục không được trùng"); } return(_productCategoryRepository.Add(productCategory)); }
public bool CheckContainProductCategory(int typeId) { return(_proCatRp.CheckContains(n => n.TypeId == typeId)); }