SaaS CMS has officially launched! Learn more now.

Class ProductContentExtensions

Extension methods for ProductContent.

Inheritance
System.Object
ProductContentExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Catalog.ContentTypes
Assembly: EPiServer.Business.Commerce.dll
Version: 11.8.3
Syntax
public static class ProductContentExtensions

Methods

GetVariants(ProductContent)

Gets the variants of a product.

Declaration
public static IEnumerable<ContentReference> GetVariants(this ProductContent product)
Parameters
Type Name Description
ProductContent product

The product.

Returns
Type Description
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference>

EPiServer.Core.ContentReferences of the product variants.

GetVariants(ProductContent, IRelationRepository)

Gets the variants of a product.

Declaration
public static IEnumerable<ContentReference> GetVariants(this ProductContent product, IRelationRepository relationRepository)
Parameters
Type Name Description
ProductContent product

The product.

IRelationRepository relationRepository

The relation repository.

Returns
Type Description
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference>

EPiServer.Core.ContentReferences of the product variants.