System\Data\Common\Internal\Materialization\Shaper.cs (4)
302AssociationSet associationSet = MetadataHelper.GetAssociationsForEntitySetAndAssociationType(entityContainer,
471if (((AssociationSet)entitySetBase).AssociationSetEnds[sourceEndName].EntitySet == entitySet)
705AssociationSet associationSet = MetadataHelper.GetAssociationsForEntitySetAndAssociationType(entityContainer, sourceKey.EntitySetName,
732int count = ObjectStateManager.UpdateRelationships(this.Context, this.MergeOption, (AssociationSet)relatedEnd.RelationshipSet, sourceMember, sourceKey, wrappedSource, targetMember, (List<T_TargetEntity>)spannedEntities, true);
System\Data\Common\Utils\MetadataHelper.cs (20)
233internal static EntitySet GetEntitySetAtEnd(AssociationSet associationSet,
256internal static bool IsEveryOtherEndAtLeastOne(AssociationSet associationSet,
506internal static bool DoesEndKeySubsumeAssociationSetKey(AssociationSet assocSet, AssociationEndMember thisEnd, HashSet<Pair<EdmMember, EntityType>> associationkeys)
548internal static bool DoesEndFormKey(AssociationSet associationSet, AssociationEndMember end)
563internal static bool IsExtentAtSomeRelationshipEnd(AssociationSet relationshipSet, EntitySetBase extent)
574internal static AssociationEndMember GetSomeEndForEntitySet(AssociationSet associationSet, EntitySetBase entitySet)
591internal static List<AssociationSet> GetAssociationsForEntitySets(EntitySet entitySet1, EntitySet entitySet2)
597List<AssociationSet> result = new List<AssociationSet>();
603AssociationSet assocSet = (AssociationSet)extent;
617internal static AssociationSet GetAssociationsForEntitySetAndAssociationType(EntityContainer entityContainer, string entitySetName,
622AssociationSet retValue = null;
630AssociationSet assocSet = (AssociationSet)extent;
649internal static List<AssociationSet> GetAssociationsForEntitySet(EntitySetBase entitySet)
653List<AssociationSet> result = new List<AssociationSet>();
659AssociationSet assocSet = (AssociationSet)extent;
System\Data\Metadata\Edm\EntitySet.cs (9)
42private ReadOnlyCollection<Tuple<AssociationSet, ReferentialConstraint>> _foreignKeyDependents;
43private ReadOnlyCollection<Tuple<AssociationSet, ReferentialConstraint>> _foreignKeyPrincipals;
69internal ReadOnlyCollection<Tuple<AssociationSet, ReferentialConstraint>> ForeignKeyDependents
85internal ReadOnlyCollection<Tuple<AssociationSet, ReferentialConstraint>> ForeignKeyPrincipals
132var dependents = new List<Tuple<AssociationSet, ReferentialConstraint>>();
133var principals = new List<Tuple<AssociationSet, ReferentialConstraint>>();
136foreach (AssociationSet associationSet in MetadataHelper.GetAssociationsForEntitySet(this))
147dependents.Add(new Tuple<AssociationSet, ReferentialConstraint>(associationSet, constraint));
153principals.Add(new Tuple<AssociationSet, ReferentialConstraint>(associationSet, constraint));
System\Data\Objects\DataClasses\RelatedEnd.cs (14)
393EntitySet ownerEntitySet = ((AssociationSet)_relationshipSet).AssociationSetEnds[_fromEndProperty.Name].EntitySet;
394EntitySet targetEntitySet = ((AssociationSet)_relationshipSet).AssociationSetEnds[_toEndProperty.Name].EntitySet;
777EntitySet targetEntitySet = ((AssociationSet)RelationshipSet).AssociationSetEnds[TargetRoleName].EntitySet;
800ObjectStateManager.UpdateRelationships(this.ObjectContext, mergeOption, (AssociationSet)RelationshipSet, (AssociationEndMember)FromEndProperty, sourceKey, _wrappedOwner, (AssociationEndMember)ToEndMember, collection, setIsLoaded);
1106if ((((AssociationSet)_relationshipSet).AssociationSetEnds[_navigation.To] != null) &&
1107(((AssociationSet)_relationshipSet).AssociationSetEnds[_navigation.To].EntitySet != set))
2135AssociationSet associationSet = (AssociationSet)_relationshipSet;
2160new RelationshipWrapper((AssociationSet)_relationshipSet,
2346AssociationSet associationset = set as AssociationSet;
2352throw EntityUtil.EntitySetIsNotValidForRelationship(entitySet.EntityContainer.Name, entitySet.Name, _navigation.From, ((AssociationSet)set).EntityContainer.Name, ((AssociationSet)set).Name);
2435if (((AssociationSet)entitySetBase).AssociationSetEnds[_navigation.From].EntitySet == entitySet)
System\Data\Objects\ObjectStateManager.cs (8)
968internal static int UpdateRelationships(ObjectContext context, MergeOption mergeOption, AssociationSet associationSet, AssociationEndMember sourceMember, EntityKey sourceKey, IEntityWrapper wrappedSource, AssociationEndMember targetMember, IList targets, bool setIsLoaded)
1106internal static void RemoveRelationships(ObjectContext context, MergeOption mergeOption, AssociationSet associationSet,
1163internal static bool TryUpdateExistingRelationships(ObjectContext context, MergeOption mergeOption, AssociationSet associationSet, AssociationEndMember sourceMember, EntityKey sourceKey, IEntityWrapper wrappedSource, AssociationEndMember targetMember, EntityKey targetKey, bool setIsLoaded, out EntityState newEntryState)
1393EntityReference reference = entry.WrappedEntity.RelationshipManager.GetRelatedEndInternal(((AssociationSet)relationshipEntry.EntitySet).ElementType.FullName, targetRoleName) as EntityReference;
1613return FindRelationship(new RelationshipWrapper((AssociationSet)relationshipSet, roleAndKey1, roleAndKey2));
2282RelationshipWrapper relationshipWrapper = new RelationshipWrapper((AssociationSet)relatedEnd.RelationshipSet,
3304AssociationSet associationSet = (AssociationSet)relatedEnd.RelationshipSet;