2 types derived from RelatedEnd
System.Data.Entity (2)
System\Data\Objects\DataClasses\EntityCollection.cs (1)
30public sealed class EntityCollection<TEntity> : RelatedEnd, ICollection<TEntity>, IListSource
System\Data\Objects\DataClasses\EntityReference.cs (1)
26public abstract class EntityReference : RelatedEnd
205 references to RelatedEnd
System.Data.Entity (205)
System\Data\Common\Internal\Materialization\Shaper.cs (4)
398RelatedEnd relatedEnd; 409private bool TryGetRelatedEnd(IEntityWrapper wrappedEntity, AssociationType associationType, string sourceEndName, string targetEndName, out RelatedEnd relatedEnd) 496private void SetIsLoadedForSpan(RelatedEnd relatedEnd, bool forceToTrue) 728RelatedEnd relatedEnd;
System\Data\Metadata\Edm\AssociationEndMember.cs (4)
43private Func<RelationshipManager, RelatedEnd, RelatedEnd> _getRelatedEndMethod = null; 46internal Func<RelationshipManager, RelatedEnd, RelatedEnd> GetRelatedEnd
System\Data\Metadata\Edm\LightweightCodeGenerator.cs (12)
94internal static RelatedEnd GetRelatedEnd(RelationshipManager sourceRelationshipManager, AssociationEndMember sourceMember, AssociationEndMember targetMember, RelatedEnd existingRelatedEnd) 96Func<RelationshipManager, RelatedEnd, RelatedEnd> getRelatedEnd = sourceMember.GetRelatedEnd; 466private static Func<RelationshipManager, RelatedEnd, RelatedEnd> CreateGetRelatedEndMethod(AssociationEndMember sourceMember, AssociationEndMember targetMember) 481return (Func<RelationshipManager, RelatedEnd, RelatedEnd>)getRelatedEndDelegate; 484private static Func<RelationshipManager, RelatedEnd, RelatedEnd> CreateGetRelatedEndMethod<TSource, TTarget>(AssociationEndMember sourceMember, AssociationEndMember targetMember, NavigationPropertyAccessor sourceAccessor, NavigationPropertyAccessor targetAccessor) 488Func<RelationshipManager, RelatedEnd, RelatedEnd> getRelatedEnd;
System\Data\Objects\DataClasses\EntityCollection.cs (1)
653RelatedEnd relatedEnd = GetOtherEndOfRelationship(wrappedEntity);
System\Data\Objects\DataClasses\EntityReference_TResultType.cs (3)
139RelatedEnd relatedEnd = GetOtherEndOfRelationship(_wrappedCachedValue); 328RelatedEnd relatedEnd = wrappedTarget.RelationshipManager.GetRelatedEndInternal(RelationshipName, RelationshipNavigation.From); 692internal void InitializeWithValue(RelatedEnd relatedEnd)
System\Data\Objects\DataClasses\IRelationshipFixer.cs (1)
25RelatedEnd CreateSourceEnd(RelationshipNavigation navigation, RelationshipManager relationshipManager);
System\Data\Objects\DataClasses\RelatedEnd.cs (16)
879RelatedEnd targetRelatedEnd = GetOtherEndOfRelationship(wrappedTarget); 1144RelatedEnd targetRelatedEnd = GetOtherEndOfRelationship(wrappedTarget); 1223RelatedEnd attachedRelatedEnd = null; // the end of the relationship that is already attached to a context, if there is one. 1387RelatedEnd otherRelatedEnd = this.GetOtherEndOfRelationship(wrappedEntity); 1406RelatedEnd relatedEnd = GetOtherEndOfRelationship(wrappedEntity); 1426RelatedEnd relatedEnd = GetOtherEndOfRelationship(wrappedEntity); 1495bool allPropertiesAreKeyProperties = RelatedEnd.CheckIfAllPropertiesAreKeyProperties(entityType.KeyMemberNames, constraint.ToProperties); 1528bool allPropertiesAreKeyProperties = RelatedEnd.CheckIfAllPropertiesAreKeyProperties(entityType.KeyMemberNames, constraint.ToProperties); 1587RelatedEnd otherRelatedEnd = GetOtherEndOfRelationship(wrappedEntity); 2024RelatedEnd relatedEnd = GetOtherEndOfRelationship(wrappedEntity); 2041RelatedEnd relatedEnd = GetOtherEndOfRelationship(wrappedEntity); 2172foreach (RelatedEnd relatedEnd in wrappedEntity.RelationshipManager.Relationships) 2216RelatedEnd relatedEnd = GetOtherEndOfRelationship(wrappedEntity); 2275foreach (RelatedEnd relatedEnd in wrappedEntity1.RelationshipManager.Relationships) 2481internal RelatedEnd GetOtherEndOfRelationship(IEntityWrapper wrappedEntity) 2485return (RelatedEnd)wrappedEntity.RelationshipManager.GetRelatedEnd(_navigation.Reverse, _relationshipFixer);
System\Data\Objects\DataClasses\RelationshipFixer.cs (1)
38RelatedEnd IRelationshipFixer.CreateSourceEnd(RelationshipNavigation navigation, RelationshipManager relationshipManager)
System\Data\Objects\DataClasses\RelationshipManager.cs (41)
53private List<RelatedEnd> _relationships; 70internal IEnumerable<RelatedEnd> Relationships 86_relationships = new List<RelatedEnd>(); 182foreach (RelatedEnd relatedEnd in _relationships) 205RelationshipMultiplicity sourceRoleMultiplicity, RelatedEnd existingRelatedEnd) 210RelatedEnd relatedEnd; 341RelationshipMultiplicity sourceRoleMultiplicity, RelatedEnd existingRelatedEnd) 346RelatedEnd relatedEnd; 371internal RelatedEnd GetRelatedEnd(string navigationProperty, bool throwArgumentException = false) 407internal RelatedEnd GetRelatedEndInternal(string relationshipName, string targetRoleName) 418RelatedEnd relatedEnd = null; 427relatedEnd = (from RelatedEnd end in _relationships 449private RelatedEnd GetRelatedEndInternal(string relationshipName, string targetRoleName, RelatedEnd existingRelatedEnd, AssociationType relationship) 454private RelatedEnd GetRelatedEndInternal(string relationshipName, string targetRoleName, RelatedEnd existingRelatedEnd, AssociationType relationship, bool throwOnError) 465RelatedEnd result = null; 545RelatedEnd relatedEnd; 903internal RelatedEnd GetRelatedEnd(RelationshipNavigation navigation, IRelationshipFixer relationshipFixer) 905RelatedEnd relatedEnd; 930internal RelatedEnd CreateRelatedEnd<TSourceEntity, TTargetEntity>(RelationshipNavigation navigation, RelationshipMultiplicity sourceRoleMultiplicity, RelationshipMultiplicity targetRoleMultiplicity, RelatedEnd existingRelatedEnd) 935RelatedEnd relatedEnd = null; 1032foreach (RelatedEnd relatedEnd in GetAllRelatedEnds()) 1065foreach (RelatedEnd relatedEnd in Relationships) 1105RelatedEnd.RemoveEntityFromObjectStateManager(wrappedOwner); 1118foreach (RelatedEnd relatedEnd in wrappedEntity.RelationshipManager.Relationships) 1137foreach (RelatedEnd relatedEnd in Relationships) 1156foreach (RelatedEnd relatedEnd in Relationships) 1162var dependentEnd = relatedEnd.GetOtherEndOfRelationship(dependent); 1185foreach (RelatedEnd relatedEnd in Relationships) 1196RelatedEnd relatedEnd; 1209((RelatedEnd)relatedEnd).ClearWrappedValues(); 1250foreach (RelatedEnd relatedEnd in _relationships) 1375foreach (RelatedEnd relatedEnd in _relationships) 1410private bool TryGetCachedRelatedEnd(string relationshipName, string targetRoleName, out RelatedEnd relatedEnd) 1417foreach (RelatedEnd end in _relationships) 1516foreach (RelatedEnd relatedEnd in Relationships) 1543foreach (RelatedEnd relatedEnd in Relationships) 1563foreach (RelatedEnd relatedEnd in _relationships) 1579foreach (var r in this._relationships)
System\Data\Objects\EntityEntry.cs (23)
1131RelatedEnd relatedEnd = this.WrappedEntity.RelationshipManager.GetRelatedEndInternal(relationshipName, targetRoleName); 1707Dictionary<RelatedEnd, HashSet<EntityKey>> keys; 2137RelatedEnd relatedEnd = rm.GetRelatedEndInternal(n.RelationshipType.FullName, n.ToEndMember.Name); 2169private void TakeSnapshotOfSingleRelationship(RelatedEnd relatedEnd, NavigationProperty n, object o) 2186RelatedEnd otherRelatedEnd = relatedWrapper.RelationshipManager.GetRelatedEndInternal(n.RelationshipType.FullName, n.FromEndMember.Name); 2213if (!RelatedEnd.VerifyRIConstraintsWithRelatedEntry(constraint, dependentEntry.GetCurrentEntityValue, principalEntry.EntityKey)) 2257RelatedEnd relatedEnd = this.WrappedEntity.RelationshipManager.GetRelatedEndInternal(n.RelationshipType.FullName, n.ToEndMember.Name); 2313Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<IEntityWrapper>>> relationships, 2315RelatedEnd relatedEndFrom, 2322RelatedEnd relatedEndTo = relatedEndFrom.GetOtherEndOfRelationship(relatedWrapper); 2337Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<EntityKey>>> relationships, 2338Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<EntityKey>>> principalRelationships, 2341RelatedEnd relatedEndFrom) 2350RelatedEnd relatedEndTo = relatedEndFrom.GetOtherEndOfRelationship(relatedWrapper); 2367Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<T>>> relationships, 2369RelatedEnd relatedEnd) 2372Dictionary<RelatedEnd, HashSet<T>> alreadyDetectedRelationshipsFrom; 2375alreadyDetectedRelationshipsFrom = new Dictionary<RelatedEnd, HashSet<T>>(); 3613RelatedEnd dependentEnd = refToPrincipal.GetOtherEndOfRelationship(wrappedPrincipal); 3654EntityReference relatedEnd = (RelatedEnd)RelationshipManager.GetRelatedEnd(principalRole.DeclaringType.FullName, principalRole.Name) as EntityReference; 3755RelatedEnd principalEnd = RelationshipManager.GetRelatedEndInternal(principal.Item1.ElementType.FullName, principal.Item2.ToRole.Name); 3832out Dictionary<RelatedEnd, HashSet<EntityKey>> relatedEntities, 3867relatedEntities = relatedEntities != null ? relatedEntities : new Dictionary<RelatedEnd, HashSet<EntityKey>>();
System\Data\Objects\Internal\BaseEntityWrapper.cs (6)
215public abstract void EnsureCollectionNotNull(RelatedEnd relatedEnd); 225public abstract object GetNavigationPropertyValue(RelatedEnd relatedEnd); 226public abstract void SetNavigationPropertyValue(RelatedEnd relatedEnd, object value); 227public abstract void RemoveNavigationPropertyValue(RelatedEnd relatedEnd, object value); 228public abstract void CollectionAdd(RelatedEnd relatedEnd, object value); 229public abstract bool CollectionRemove(RelatedEnd relatedEnd, object value);
System\Data\Objects\Internal\EntityWrapper.cs (6)
243public override void CollectionAdd(RelatedEnd relatedEnd, object value) 251public override bool CollectionRemove(RelatedEnd relatedEnd, object value) 257public override void EnsureCollectionNotNull(RelatedEnd relatedEnd) 271public override object GetNavigationPropertyValue(RelatedEnd relatedEnd) 277public override void SetNavigationPropertyValue(RelatedEnd relatedEnd, object value) 286public override void RemoveNavigationPropertyValue(RelatedEnd relatedEnd, object value)
System\Data\Objects\Internal\ForeignKeyFactory.cs (1)
77public static EntityKey CreateKeyFromForeignKeyValues(EntityEntry dependentEntry, RelatedEnd relatedEnd)
System\Data\Objects\Internal\IEntityWrapper.cs (6)
50void EnsureCollectionNotNull(RelatedEnd relatedEnd); 131void CollectionAdd(RelatedEnd relatedEnd, object value); 139bool CollectionRemove(RelatedEnd relatedEnd, object value); 146object GetNavigationPropertyValue(RelatedEnd relatedEnd); 154void SetNavigationPropertyValue(RelatedEnd relatedEnd, object value); 165void RemoveNavigationPropertyValue(RelatedEnd relatedEnd, object value);
System\Data\Objects\Internal\IPropertyAccessorStrategy.cs (5)
25object GetNavigationPropertyValue(RelatedEnd relatedEnd); 32void SetNavigationPropertyValue(RelatedEnd relatedEnd, object value); 39void CollectionAdd(RelatedEnd relatedEnd, object value); 47bool CollectionRemove(RelatedEnd relatedEnd, object value); 54object CollectionCreate(RelatedEnd relatedEnd);
System\Data\Objects\Internal\LazyLoadBehavior.cs (1)
175RelatedEnd relatedEnd = relationshipManager.GetRelatedEndInternal(relationshipName, targetRoleName);
System\Data\Objects\Internal\LightweightEntityWrapper.cs (6)
108public override void CollectionAdd(RelatedEnd relatedEnd, object value) 113public override bool CollectionRemove(RelatedEnd relatedEnd, object value) 119public override void SetNavigationPropertyValue(RelatedEnd relatedEnd, object value) 124public override void RemoveNavigationPropertyValue(RelatedEnd relatedEnd, object value) 129public override void EnsureCollectionNotNull(RelatedEnd relatedEnd) 134public override object GetNavigationPropertyValue(RelatedEnd relatedEnd)
System\Data\Objects\Internal\NullEntityWrapper.cs (6)
67public void CollectionAdd(RelatedEnd relatedEnd, object value) 72public bool CollectionRemove(RelatedEnd relatedEnd, object value) 158public void EnsureCollectionNotNull(RelatedEnd relatedEnd) 163public object GetNavigationPropertyValue(RelatedEnd relatedEnd) 169public void SetNavigationPropertyValue(RelatedEnd relatedEnd, object value) 174public void RemoveNavigationPropertyValue(RelatedEnd relatedEnd, object value)
System\Data\Objects\Internal\PocoPropertyAccessorStrategy.cs (6)
42public object GetNavigationPropertyValue(RelatedEnd relatedEnd) 75public void SetNavigationPropertyValue(RelatedEnd relatedEnd, object value) 101private static Type GetDeclaringType(RelatedEnd relatedEnd) 147public void CollectionAdd(RelatedEnd relatedEnd, object value) 211public bool CollectionRemove(RelatedEnd relatedEnd, object value) 270public object CollectionCreate(RelatedEnd relatedEnd)
System\Data\Objects\Internal\TransactionManager.cs (15)
26internal Dictionary<RelatedEnd, IList<IEntityWrapper>> PromotedRelationships 102internal Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<IEntityWrapper>>> AddedRelationshipsByGraph 109internal Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<IEntityWrapper>>> DeletedRelationshipsByGraph 116internal Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<EntityKey>>> AddedRelationshipsByForeignKey 123internal Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<EntityKey>>> AddedRelationshipsByPrincipalKey 130internal Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<EntityKey>>> DeletedRelationshipsByForeignKey 137internal Dictionary<IEntityWrapper, HashSet<RelatedEnd>> ChangedForeignKeys 226this.PromotedRelationships = new Dictionary<RelatedEnd, IList<IEntityWrapper>>(); 261this.PromotedRelationships = new Dictionary<RelatedEnd, IList<IEntityWrapper>>(); 305this.DeletedRelationshipsByGraph = new Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<IEntityWrapper>>>(); 306this.AddedRelationshipsByGraph = new Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<IEntityWrapper>>>(); 307this.DeletedRelationshipsByForeignKey = new Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<EntityKey>>>(); 308this.AddedRelationshipsByForeignKey = new Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<EntityKey>>>(); 309this.AddedRelationshipsByPrincipalKey = new Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<EntityKey>>>(); 310this.ChangedForeignKeys = new Dictionary<IEntityWrapper, HashSet<RelatedEnd>>();
System\Data\Objects\ObjectContext.cs (2)
676RelatedEnd.RemoveEntityFromObjectStateManager(wrappedEntity); 1060RelatedEnd.RemoveEntityFromObjectStateManager(wrappedEntity);
System\Data\Objects\ObjectStateManager.cs (36)
614foreach (RelatedEnd end in entry.RelationshipManager.Relationships) 756internal void TrackPromotedRelationship(RelatedEnd relatedEnd, IEntityWrapper wrappedEntity) 812RelatedEnd relatedEnd = wrappedSource.RelationshipManager.GetRelatedEndInternal(sourceMember.DeclaringType.FullName, targetMember.Name); 876RelatedEnd targetRelatedEnd = null; 925private static void UpdateRelatedEnd(RelatedEnd relatedEnd, IEntityWrapper wrappedEntity, IEntityWrapper wrappedRelatedEntity, bool setIsLoaded, MergeOption mergeOption) 979RelatedEnd relatedEnd = wrappedSource.RelationshipManager.GetRelatedEndInternal(sourceMember.DeclaringType.FullName, targetMember.Name); 1087RelatedEnd relatedEnd = wrappedSource.RelationshipManager.GetRelatedEndInternal(sourceMember.DeclaringType.FullName, targetMember.Name); 2208RelatedEnd relatedEnd = (RelatedEnd)sourceEntry.WrappedEntity.RelationshipManager.GetRelatedEnd(navigationProperty); 2240RelatedEnd relatedEnd = (RelatedEnd)sourceEntry.WrappedEntity.RelationshipManager.GetRelatedEnd(navigationProperty, throwArgumentException: removedConvert); 2269RelatedEnd relatedEnd = sourceEntry.WrappedEntity.RelationshipManager.GetRelatedEndInternal(relationshipName, targetRoleName); 2277RelatedEnd relatedEnd, 2324private void VerifyInitialStateForChangeRelationshipState(EntityEntry sourceEntry, EntityEntry targetEntry, RelatedEnd relatedEnd, EntityState relationshipState) 2348private RelationshipEntry CreateRelationship(EntityEntry targetEntry, RelatedEnd relatedEnd, RelationshipWrapper relationshipWrapper, EntityState requestedState) 3122Dictionary<RelatedEnd, HashSet<IEntityWrapper>> addedRelationshipsByGraph; 3124Dictionary<RelatedEnd, HashSet<EntityKey>> addedRelationshipsByForeignKey; 3212Dictionary<RelatedEnd, HashSet<EntityKey>> addedRelationshipsByPrincipalKey; 3236Dictionary<RelatedEnd, HashSet<EntityKey>> deletedRelationshipsByForeignKey; 3287internal EntityKey GetPermanentKey(IEntityWrapper entityFrom, RelatedEnd relatedEndFrom, IEntityWrapper entityTo) 3302private EntitySet GetEntitySetOfOtherEnd(IEntityWrapper entity, RelatedEnd relatedEnd) 3343foreach (RelatedEnd relatedEnd in entry.WrappedEntity.RelationshipManager.Relationships) 3349Dictionary<RelatedEnd, HashSet<EntityKey>> addedRelationshipsByForeignKey; 3359Dictionary<RelatedEnd, HashSet<IEntityWrapper>> addedRelationshipsByGraph; 3416private void PerformAdd(IEntityWrapper wrappedOwner, RelatedEnd relatedEnd, IEntityWrapper entityToAdd, bool isForeignKeyChange) 3469foreach (RelatedEnd relatedEnd in entry.WrappedEntity.RelationshipManager.Relationships) 3475Dictionary<RelatedEnd, HashSet<EntityKey>> deletedRelationshipsByForeignKey; 3484Dictionary<RelatedEnd, HashSet<IEntityWrapper>> deletedRelationshipsByGraph; 3601private bool ShouldPreserveForeignKeyForPrincipal(IEntityWrapper entity, RelatedEnd relatedEnd, IEntityWrapper relatedEntity, 3607RelatedEnd otherEnd = relatedEnd.GetOtherEndOfRelationship(relatedEntity); 3612Dictionary<RelatedEnd, HashSet<EntityKey>> deletedRelationshipsByForeignKey; 3613Dictionary<RelatedEnd, HashSet<IEntityWrapper>> deletedRelationshipsByGraph; 3628private bool ShouldPreserveForeignKeyForDependent(IEntityWrapper entity, RelatedEnd relatedEnd, IEntityWrapper relatedEntity, 3638Dictionary<RelatedEnd, HashSet<IEntityWrapper>> addedRelationshipsByGraph; 3665Dictionary<RelatedEnd, HashSet<EntityKey>> addedRelationshipsByForeignKey; 3673Dictionary<RelatedEnd, HashSet<IEntityWrapper>> addedRelationshipsByGraph;
System\Data\Objects\ObjectViewListener.cs (2)
62((RelatedEnd)_dataSource).AssociationChangedForObjectView += CollectionChanged; 75((RelatedEnd)_dataSource).AssociationChangedForObjectView -= CollectionChanged;
System\Data\Objects\RelationshipEntry.cs (1)
606internal void ChangeRelationshipState(EntityEntry targetEntry, RelatedEnd relatedEnd, EntityState requestedState)