Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Class RelationRepositoryExtensions

Extension methods for IRelationRepository.

Inheritance
System.Object
RelationRepositoryExtensions
Namespace: EPiServer.Commerce.Catalog.Linking
Assembly: EPiServer.Business.Commerce.dll
Version: 14.26.0
Syntax
public static class RelationRepositoryExtensions : Object

Methods

RemoveRelation(IRelationRepository, Relation)

Removes the relation. This is equivalent to calling RemoveRelations(IEnumerable<Relation>) with one item.

Declaration
public static void RemoveRelation(this IRelationRepository relationRepository, Relation relation)
Parameters
Type Name Description
IRelationRepository relationRepository

The relation repository.

Relation relation

The relation to remove.

UpdateRelation(IRelationRepository, Relation)

Adds or updates the relation for the catalog content specified by the relations Source. This is equivalent to calling UpdateRelations(IEnumerable<Relation>) with one item.

Declaration
public static void UpdateRelation(this IRelationRepository relationRepository, Relation relation)
Parameters
Type Name Description
IRelationRepository relationRepository

The relation repository.

Relation relation

The relation.