public PartyCommodityList BuildPartyCommodities(IQueryable data)
        {
            var partyCommodities = new PartyCommodityList();
            var crossMapNumber = 0;

            foreach (var item in data)
            {
                var partyCrossMap = item as PartyCrossMap;

                Debug.Assert(partyCrossMap != null, "partyCrossMap != null");

                if (string.IsNullOrWhiteSpace(partyCrossMap.Commodity))
                {
                    continue;
                }

                partyCommodities.AddRange(PartyCommodities(partyCrossMap, crossMapNumber));

                crossMapNumber++;
            }

            return partyCommodities;
        }
        public PartyCommodityList BuildPartyCommodities(IQueryable data)
        {
            var partyCommodities = new PartyCommodityList();
            var crossMapNumber   = 0;

            foreach (var item in data)
            {
                var partyCrossMap = item as PartyCrossMap;

                Debug.Assert(partyCrossMap != null, "partyCrossMap != null");

                if (string.IsNullOrWhiteSpace(partyCrossMap.Commodity))
                {
                    continue;
                }

                partyCommodities.AddRange(PartyCommodities(partyCrossMap, crossMapNumber));

                crossMapNumber++;
            }

            return(partyCommodities);
        }