Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Interface IContentVersionRepository

Definies signature for ContentVersion repository.

Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
public interface IContentVersionRepository

Methods

Delete(ContentReference)

Delete a single version of a Content

Declaration
void Delete(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

List(VersionFilter, Int32, Int32, out Int32)

Lists all versions that matches the filter

Declaration
IEnumerable<ContentVersion> List(VersionFilter filter, int startIndex, int maxRows, out int totalCount)
Parameters
Type Name Description
VersionFilter filter

The filter used

System.Int32 startIndex

The start index, used for paging

System.Int32 maxRows

The maximum number of rows returned

System.Int32 totalCount

The total amount of matched versions

Returns
Type Description
System.Collections.Generic.IEnumerable<ContentVersion>

A list of versions, if no versions where matched an empty list will be returned

Load(ContentReference)

Loads the version.

Declaration
ContentVersion Load(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
ContentVersion

A ContentVersion

LoadCommonDraft(ContentReference, String)

Loads the common draft.

Declaration
ContentVersion LoadCommonDraft(ContentReference contentLink, string language)
Parameters
Type Name Description
ContentReference contentLink

The content link to load common draft for.

System.String language

The language.

Returns
Type Description
ContentVersion

CommonDraft if it exist, otherwise Published, If no published exist the latest saved version is returned

LoadPublished(ContentReference)

Loads the published version

Declaration
ContentVersion LoadPublished(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
ContentVersion

A ContentVersion

LoadPublished(ContentReference, String)

Loads the published version a page with current language selection if the languageBranch is null otherwise loads the published version a page for a specific language

Declaration
ContentVersion LoadPublished(ContentReference contentLink, string languageBranch)
Parameters
Type Name Description
ContentReference contentLink

The content link.

System.String languageBranch

The language branch.

Returns
Type Description
ContentVersion

A ContentVersion

SetCommonDraft(ContentReference)

Sets the specified version as common draft.

Declaration
void SetCommonDraft(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Extension Methods