Ads a related item to the relationship.

Namespace: MonoSoftware.MonoX.Repositories
Assembly: MonoX (in MonoX.dll) Version: 5.1.40.5065 (5.1.40.5065)

Syntax

C#
void AddRelatedItem<T>(
	Guid parentId,
	int parentEntityType,
	int childEntityType,
	T entityToAdd,
	EntityCollection<SnRelationshipEntity> relationships
)
Visual Basic
Sub AddRelatedItem(Of T) ( 
	parentId As Guid,
	parentEntityType As Integer,
	childEntityType As Integer,
	entityToAdd As T,
	relationships As EntityCollection(Of SnRelationshipEntity)
)
Visual C++
generic<typename T>
void AddRelatedItem(
	Guid parentId, 
	int parentEntityType, 
	int childEntityType, 
	T entityToAdd, 
	EntityCollection<SnRelationshipEntity^>^ relationships
)
F#
abstract AddRelatedItem : 
        parentId : Guid * 
        parentEntityType : int * 
        childEntityType : int * 
        entityToAdd : 'T * 
        relationships : EntityCollection<SnRelationshipEntity> -> unit 

Parameters

parentId
Type: System..::..Guid
Parent entity Id.
parentEntityType
Type: System..::..Int32
Parent entity type (for example BlogPost).
childEntityType
Type: System..::..Int32
Child entity type (for example SnComment).
entityToAdd
Type: T
Child entity to add.
relationships
Type: EntityCollection<(Of <(<'SnRelationshipEntity>)>)>
Relationships collection that is modified by adding a related item.

Type Parameters

T
Type of the entity to add.

See Also