/// <summary> /// Initializes a new instance of the <see cref="Relationship" /> class. /// </summary> /// <param name="copyRelationship">The copy relationship.</param> public modelEntityRelationship(modelEntityRelationship copyRelationship) : this() { this.optional = copyRelationship.optional; this.syncable = copyRelationship.syncable; this.name = copyRelationship.name; this.destinationEntity = copyRelationship.destinationEntity; this.minCount = copyRelationship.minCount; this.maxCount = copyRelationship.maxCount; this.deletionRule = copyRelationship.deletionRule; this.inverseName = copyRelationship.inverseName; this.inverseEntity = copyRelationship.inverseEntity; this.toMany = copyRelationship.toMany; }
/// <summary> /// Deletes the relationship. /// </summary> /// <param name="relationship">The relationship.</param> public void DeleteRelationship(modelEntityRelationship relationship) { parent.relationship.Remove(relationship); this.DeletedRelationships.Add(new modelEntityRelationship(relationship)); }