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