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); }); }