/// <summary> /// Allows you to populate the current product property object using a ProductPropertyDTO instance /// </summary> /// <param name="dto">An instance of the ProductProperty from the REST API</param> public void FromDto(ProductPropertyDTO dto) { if (dto == null) { return; } Choices.Clear(); if (dto.Choices != null) { foreach (var c in dto.Choices) { var pc = new ProductPropertyChoice(); pc.FromDto(c); Choices.Add(pc); } } CultureCode = dto.CultureCode; DefaultValue = dto.DefaultValue; DisplayName = dto.DisplayName; DisplayOnSite = dto.DisplayOnSite; DisplayToDropShipper = dto.DisplayToDropShipper; Id = dto.Id; PropertyName = dto.PropertyName; StoreId = dto.StoreId; TypeCode = (ProductPropertyType)(int)dto.TypeCode; LastUpdatedUtc = dto.LastUpdatedUtc; }
public bool ChoiceUpdate(ProductPropertyChoice item) { return(choiceRepository.Update(item)); }