コード例 #1
0
        private void UpdateCurrentMasterGroupMappings()
        {
            List <MasterGroupMapping> listOfMasterGroupMappings = masterGroupMappingRepo.GetListOfAllMasterGroupMappings();

            listOfMasterGroupMappings
            .Where(x => x.ConnectorID == null)
            .Where(x => x.ProductGroupID != -1)
            .ForEach(masterGroupMapping =>
            {
                masterGroupMapping.ProductGroupID = -1;
                masterGroupMappingRepo.UpdateMasterGroupMapping(masterGroupMapping);
            });
        }
コード例 #2
0
        private void UpdateProductGroupMappingInDestConnector(List <MasterGroupMapping> listOfProductGroupMappingToUpdate, List <MasterGroupMapping> listOfParentProductGroupMapping)
        {
            List <string> ignoreList = generateIgnoreList.GenerateIgnoreProperties(new MasterGroupMapping(),
                                                                                   x => x.MasterGroupMappingID,
                                                                                   x => x.ConnectorID,
                                                                                   x => x.ParentMasterGroupMappingID,
                                                                                   x => x.SourceProductGroupMappingID);

            listOfProductGroupMappingToUpdate.ForEach(productGroupMapping =>
            {
                MasterGroupMapping compareProductGroupMapping = listOfParentProductGroupMapping.SingleOrDefault(x => x.MasterGroupMappingID == productGroupMapping.SourceProductGroupMappingID);
                if (compareProductGroupMapping != null)
                {
                    masterGroupMappingRepo.UpdateMasterGroupMapping(productGroupMapping, compareProductGroupMapping, ignoreList);
                }
            });
        }