diff --git a/VirtoCommerce.Storefront.Model/Catalog/Category.cs b/VirtoCommerce.Storefront.Model/Catalog/Category.cs index e270b9941..3b6a0acc2 100644 --- a/VirtoCommerce.Storefront.Model/Catalog/Category.cs +++ b/VirtoCommerce.Storefront.Model/Catalog/Category.cs @@ -5,12 +5,12 @@ namespace VirtoCommerce.Storefront.Model.Catalog { - public partial class Category : Entity, IHasProperties, IAccessibleByIndexKey + public partial class Category : Entity, IAccessibleByIndexKey { public Category() { Images = new List(); - Properties = new List(); + Properties = MutablePagedList.Empty; } public string CatalogId { get; set; } @@ -71,10 +71,7 @@ public override string ToString() return SeoPath ?? base.ToString(); } - #region IHasProperties Members - public IList Properties { get; set; } - #endregion - + public IMutablePagedList Properties { get; set; } public string Handle => SeoInfo?.Slug ?? Id; public string IndexKey => Handle; } diff --git a/VirtoCommerce.Storefront/Domain/Catalog/CatalogConverter.cs b/VirtoCommerce.Storefront/Domain/Catalog/CatalogConverter.cs index 321e77cbd..c9a03ad28 100644 --- a/VirtoCommerce.Storefront/Domain/Catalog/CatalogConverter.cs +++ b/VirtoCommerce.Storefront/Domain/Catalog/CatalogConverter.cs @@ -270,10 +270,9 @@ public static Category ToCategory(this catalogDto.Category categoryDto, Language if (categoryDto.Properties != null) { - result.Properties = categoryDto.Properties + result.Properties = new MutablePagedList(categoryDto.Properties .Where(x => string.Equals(x.Type, "Category", StringComparison.OrdinalIgnoreCase)) - .Select(p => ToProperty(p, currentLanguage)) - .ToList(); + .Select(p => ToProperty(p, currentLanguage))); } return result;