Exemple #1
0
        private ParameterValueVersionCategory mapCategoryFrom(IEnumerable <FlatParameterValueVersion> flatPvvCategories, string categoryName)
        {
            var pvvsForCategory = from flatPVV in flatPvvCategories
                                  where flatPVV.Category == categoryName
                                  select flatPVV;

            var pvvCategory = new ParameterValueVersionCategory {
                Name = categoryName
            };

            pvvsForCategory.Each(flatPvv => pvvCategory.Add(_parameterValueVersionRepository.FindBy(flatPvv.Id)));
            return(pvvCategory);
        }
        public override ParameterValueVersion CreateObject(XElement element, SerializationContext serializationContext)
        {
            var name = element.GetAttribute(CoreConstants.Serialization.Attribute.Name);

            return(_parameterValueVersionRepository.FindBy(name));
        }