private void RemoveFromSingleReverseRelationship(IRelationship reverseRelationship) { var singleReverseRelationship = reverseRelationship as SingleRelationshipBase; if (singleReverseRelationship == null) { return; } RelationshipUtils.CheckCorrespondingSingleRelationshipsAreValid(this, singleReverseRelationship); ((ISingleRelationship)singleReverseRelationship).SetRelatedObject(null); }
private void AddToSingleReverseRelationship(IRelationship reverseRelationship) { var singleRelationship = reverseRelationship as ISingleRelationship; if (singleRelationship == null) { return; } RelationshipUtils.CheckCorrespondingSingleRelationshipsAreValid (this, (SingleRelationshipBase)singleRelationship); singleRelationship.SetRelatedObject(this.OwningBO); }