Ensures that a relationship for a particular parent id and entity type exists in a relationships collection. Works directly with the database, use the other overload to work with in-memory entities.

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

Syntax

C#
public virtual SnRelationshipEntity EnsureRelationshipExists(
	Guid parentId,
	int entityType
)
Visual Basic
Public Overridable Function EnsureRelationshipExists ( 
	parentId As Guid,
	entityType As Integer
) As SnRelationshipEntity
Visual C++
public:
virtual SnRelationshipEntity^ EnsureRelationshipExists(
	Guid parentId, 
	int entityType
)
F#
abstract EnsureRelationshipExists : 
        parentId : Guid * 
        entityType : int -> SnRelationshipEntity 
override EnsureRelationshipExists : 
        parentId : Guid * 
        entityType : int -> SnRelationshipEntity 

Parameters

parentId
Type: System..::..Guid
Parent id.
entityType
Type: System..::..Int32
Entity type.

Return Value

Type: SnRelationshipEntity
An existing (or newly created) relationship.

Implements

IRelationshipRepository..::..EnsureRelationshipExists(Guid, Int32)

See Also