Exemple #1
0
 /// <summary>
 /// Adds a new relationship to this object.
 /// </summary>
 /// <param name="uniqueId">The id of the other object in the relationship.</param>
 /// <param name="relationshipType">String key of the outgoing type of the relationship.</param>
 /// <param name="inverseRelationshipType">
 /// String key of the inverse type of the relationship.
 /// Only use if the other object will NOT read this inverse relationship from its own data.
 /// </param>
 public void AddRelationship(string uniqueId, string relationshipType, string inverseRelationshipType)
 {
     ObjectDatabase.AddRelationship(UniqueId, new ObjectRelationship(uniqueId, relationshipType));
     if (!string.IsNullOrEmpty(inverseRelationshipType))
     {
         ObjectDatabase.AddInverseRelationship(uniqueId, new ObjectRelationship(UniqueId, inverseRelationshipType));
     }
 }
Exemple #2
0
 /// <summary>
 /// Adds a new relationship to this object.
 /// </summary>
 public void AddRelationship(ObjectRelationship relationship)
 {
     ObjectDatabase.AddRelationship(UniqueId, relationship);
 }