November Happy Hour will be moved to Thursday December 5th.

Interface IActivityAssociationRepository

Repository for managing Activity associations.

Namespace: EPiServer.DataAbstraction.Activities.Internal
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
public interface IActivityAssociationRepository

Methods

AssociateAsync(Uri, Int64)

Associates an activity with provided URI.

Declaration
Task AssociateAsync(Uri associatedUri, long activityId)
Parameters
Type Name Description
System.Uri associatedUri

The associated URI.

System.Int64 activityId

The identifier of the activity.

Returns
Type Description
System.Threading.Tasks.Task

ListAssociationsAsync(Int64)

Lists the associations asynchronous.

Declaration
Task<IEnumerable<Uri>> ListAssociationsAsync(long activityId)
Parameters
Type Name Description
System.Int64 activityId

The identifier of the activity.

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.Uri>>

A list of all associations

RemoveAssociationAsync(Uri, Int64)

Removes a specific association from an activity.

Declaration
Task<bool> RemoveAssociationAsync(Uri associatedItem, long activityId)
Parameters
Type Name Description
System.Uri associatedItem

The association that should be removed.

System.Int64 activityId

The identifier of the activity.

Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>

RemoveAssociationsAsync(Uri)

Removes all associations to a given activity.

Declaration
Task<int> RemoveAssociationsAsync(Uri associatedItem)
Parameters
Type Name Description
System.Uri associatedItem
Returns
Type Description
System.Threading.Tasks.Task<System.Int32>
Remarks

For example if a project is deleted this is called with ActivityFeed.CreateProjectUri(projectId).

RemoveAssociationsAsync(Uri, Uri)

Removes all associations between associatedItem and relatedItem.

Declaration
Task<int> RemoveAssociationsAsync(Uri associatedItem, Uri relatedItem)
Parameters
Type Name Description
System.Uri associatedItem
System.Uri relatedItem
Returns
Type Description
System.Threading.Tasks.Task<System.Int32>
Remarks

For example if a content version is removed from a project this is called with ActivityFeed.CreateProjectUri(projectId) and ActivityFeed.CreateContentUri which will remove all associations between the project and the version.

Extension Methods