コード例 #1
0
        private void RemoveFromSingleReverseRelationship(IRelationship reverseRelationship)
        {
            var singleReverseRelationship = reverseRelationship as SingleRelationshipBase;

            if (singleReverseRelationship == null)
            {
                return;
            }

            RelationshipUtils.CheckCorrespondingSingleRelationshipsAreValid(this, singleReverseRelationship);
            ((ISingleRelationship)singleReverseRelationship).SetRelatedObject(null);
        }
コード例 #2
0
        private void AddToSingleReverseRelationship(IRelationship reverseRelationship)
        {
            var singleRelationship = reverseRelationship as ISingleRelationship;

            if (singleRelationship == null)
            {
                return;
            }
            RelationshipUtils.CheckCorrespondingSingleRelationshipsAreValid
                (this, (SingleRelationshipBase)singleRelationship);
            singleRelationship.SetRelatedObject(this.OwningBO);
        }