Ejemplo n.º 1
0
        public override RelatedModel GetProductRelationships(ProductModel productModel, string relationTypeName, bool includeBaseProductRelations = true, bool includeVariantRelations = true)
        {
            if (string.IsNullOrEmpty(relationTypeName))
            {
                return(null);
            }

            var relationshipType = _relationshipTypeService.Get(relationTypeName);

            return(relationshipType != null?_relatedModelBuilder.Build(productModel, relationshipType, includeBaseProductRelations, includeVariantRelations) : null);
        }