With Opticon around the corner, we'll be canceling this month's (Sept) Happy Hour.

Class IContentRepositoryExtensions

Extensions methods for batch saving EPiServer.IContentRepository

Inheritance
System.Object
IContentRepositoryExtensions
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.Extensions
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0
Syntax
public static class IContentRepositoryExtensions

Methods

Publish(IContentRepository, IEnumerable<CatalogContentBase>)

Publishes multiple catalog contents at once without syncing drafts.

Declaration
public static void Publish(this IContentRepository contentRepository, IEnumerable<CatalogContentBase> contents)
Parameters
Type Name Description
EPiServer.IContentRepository contentRepository

The instance of EPiServer.IContentRepository this extension method is used for.

System.Collections.Generic.IEnumerable<CatalogContentBase> contents

Contents to be saved.

Remarks

IMPORTANT! This method bypasses the content publishing pipeline and therefore does not validate for error, nor fire content level events, nor handle versions. It does not create new versions, but commits data in the contents to the published versions.

Publish(IContentRepository, IEnumerable<CatalogContentBase>, PublishAction)

Publishes multiple catalog contents at once.

Declaration
public static void Publish(this IContentRepository contentRepository, IEnumerable<CatalogContentBase> contents, PublishAction publishAction)
Parameters
Type Name Description
EPiServer.IContentRepository contentRepository

The instance of EPiServer.IContentRepository this extension method is used for.

System.Collections.Generic.IEnumerable<CatalogContentBase> contents

Contents to be saved.

PublishAction publishAction

Flag for publish behavior.

Remarks

IMPORTANT! This method bypasses the content publishing pipeline and therefore does not validate for error, nor fire content level events, nor handle versions. It does not create new versions, but commits data in the contents to the published versions.