internal void SetNextRelationshipEnd(EntityKey entityKey, RelationshipEntry nextEnd) { DebugCheck.NotNull((object)entityKey); Debug.Assert(entityKey.Equals(Key0) || entityKey.Equals(Key1), "EntityKey mismatch"); if (entityKey.Equals(Key0)) { NextKey0 = nextEnd; } else { NextKey1 = nextEnd; } }
/// <summary> /// Update one of the ends of the relationship /// </summary> internal void ChangeRelatedEnd(EntityKey oldKey, EntityKey newKey) { if (oldKey.Equals(Key0)) { if (oldKey.Equals(Key1)) { // self-reference RelationshipWrapper = new RelationshipWrapper(RelationshipWrapper.AssociationSet, newKey); } else { RelationshipWrapper = new RelationshipWrapper(RelationshipWrapper, 0, newKey); } } else { RelationshipWrapper = new RelationshipWrapper(RelationshipWrapper, 1, newKey); } }
internal RelationshipEntry GetNextRelationshipEnd(EntityKey entityKey) { DebugCheck.NotNull((object)entityKey); Debug.Assert(entityKey.Equals(Key0) || entityKey.Equals(Key1), "EntityKey mismatch"); return (entityKey.Equals(Key0) ? NextKey0 : NextKey1); }
internal RelationshipEntry GetNextRelationshipEnd(EntityKey entityKey) { DebugCheck.NotNull((object)entityKey); Debug.Assert(entityKey.Equals(Key0) || entityKey.Equals(Key1), "EntityKey mismatch"); return(entityKey.Equals(Key0) ? NextKey0 : NextKey1); }