Example #1
0
        List <ProductChildFeature> get_List_Of_Missing_ProductChild_Features_In_ProductChild(
            List <ProductFeature> listOfProductFeatures,
            List <ProductChildFeature> listOfProductChildFeatures)
        {
            if (listOfProductFeatures.IsNullOrEmpty())
            {
                return(null);
            }

            List <ProductChildFeature> listMissingProductChildFeatures = new List <ProductChildFeature>();

            if (listOfProductChildFeatures.IsNull())
            {
                listOfProductChildFeatures = new List <ProductChildFeature>();
            }

            foreach (ProductFeature pf in listOfProductFeatures)
            {
                bool found = listOfProductChildFeatures.Any(x => x.Name.ToLower() == pf.Name.ToLower());
                if (found)
                {
                    continue;
                }

                bool foundInAddList = listMissingProductChildFeatures.Any(x => x.Name.ToLower() == pf.Name.ToLower());
                if (foundInAddList)
                {
                    continue;
                }

                ProductChildFeature pcf = ProductChildFeatureBiz.Factory() as ProductChildFeature;
                pcf.Name    = pf.Name;
                pcf.Comment = pf.Comment;
                listMissingProductChildFeatures.Add(pcf);
            }
            return(listMissingProductChildFeatures);
        }
Example #2
0
 public ProductChildBiz(IRepositry <ProductChild> entityDal, BizParameters bizParameters, OwnerBiz ownerBiz, ProductChildFeatureBiz productChildFeatureBiz)
     : base(entityDal, bizParameters)
 {
     _ownerBiz = ownerBiz;
     _productChildFeatureBiz = productChildFeatureBiz;
 }