1 instantiation of RelationshipEntry
System.Data.Entity (1)
System\Data\Objects\ObjectStateManager.cs (1)
1504
RelationshipEntry entry = new
RelationshipEntry
(this, desiredState, wrapper);
109 references to RelationshipEntry
System.Data.Entity (109)
System\Data\Objects\DataClasses\EntityReference.cs (1)
131
foreach (
RelationshipEntry
relationshipEntry in this.ObjectContext.ObjectStateManager.FindRelationshipsByKey(ownerKey))
System\Data\Objects\DataClasses\EntityReference_TResultType.cs (3)
304
foreach (
RelationshipEntry
relationshipEntry in this.ObjectContext.ObjectStateManager.FindRelationshipsByKey(DetachedEntityKey))
390
RelationshipEntry
relationshipEntry = IsForeignKey ? null : FindRelationshipEntryInObjectStateManager(_wrappedCachedValue);
436
RelationshipEntry
relationshipEntry = this.ObjectContext.ObjectStateManager.FindRelationship(RelationshipSet,
System\Data\Objects\DataClasses\RelatedEnd.cs (6)
1779
internal
RelationshipEntry
FindRelationshipEntryInObjectStateManager(IEntityWrapper wrappedEntity)
2146
private
RelationshipEntry
AddRelationshipToObjectStateManager(IEntityWrapper wrappedEntity, bool addRelationshipAsUnchanged, bool doAttach)
2206
RelationshipEntry
deletedEntry = MarkRelationshipAsDeletedInObjectStateManager(wrappedEntity, wrappedOwner, relationshipSet, navigation);
2237
private static
RelationshipEntry
MarkRelationshipAsDeletedInObjectStateManager(IEntityWrapper wrappedEntity, IEntityWrapper wrappedOwner, RelationshipSet relationshipSet, RelationshipNavigation navigation)
2241
RelationshipEntry
entry = null;
2261
RelationshipEntry
entry = wrappedEntity.Context.ObjectStateManager.FindRelationship(relationshipSet,
System\Data\Objects\EntityEntry.cs (31)
47
private
RelationshipEntry
_headRelationshipEnds;
611
internal void AddRelationshipEnd(
RelationshipEntry
item)
641
internal bool ContainsRelationshipEnd(
RelationshipEntry
item)
643
for (
RelationshipEntry
current = _headRelationshipEnds;
659
internal void RemoveRelationshipEnd(
RelationshipEntry
item)
667
RelationshipEntry
current = _headRelationshipEnds;
668
RelationshipEntry
previous = null;
677
RelationshipEntry
next;
728
RelationshipEntry
next = _headRelationshipEnds;
732
RelationshipEntry
current = next;
764
internal struct RelationshipEndEnumerable : IEnumerable<
RelationshipEntry
>, IEnumerable<IEntityStateEntry>
766
internal static readonly
RelationshipEntry
[] EmptyRelationshipEntryArray = new
RelationshipEntry
[0];
781
IEnumerator<
RelationshipEntry
> IEnumerable<
RelationshipEntry
>.GetEnumerator()
795
internal
RelationshipEntry
[] ToArray()
797
RelationshipEntry
[] list = null;
800
RelationshipEntry
relationshipEnd = _entityEntry._headRelationshipEnds;
801
list = new
RelationshipEntry
[_entityEntry._countRelationshipEnds];
819
internal struct RelationshipEndEnumerator : IEnumerator<
RelationshipEntry
>, IEnumerator<IEntityStateEntry>
822
private
RelationshipEntry
_current;
829
public
RelationshipEntry
Current
951
foreach (
RelationshipEntry
entry in _cache.CopyOfRelationshipsByKey(EntityKey))
1407
internal AssociationEndMember GetAssociationEndMember(
RelationshipEntry
relationshipEntry)
1420
internal EntityEntry GetOtherEndOfRelationship(
RelationshipEntry
relationshipEntry)
2550
foreach (
RelationshipEntry
relationshipEntry in _cache.FindRelationshipsByKey(EntityKey))
2576
foreach (
RelationshipEntry
relationshipEntry in _cache.CopyOfRelationshipsByKey(EntityKey))
2637
foreach (
RelationshipEntry
relationshipEntry in _cache.CopyOfRelationshipsByKey(EntityKey))
2716
foreach (
RelationshipEntry
relationshipEntry in _cache.FindRelationshipsByKey(EntityKey))
2788
foreach (
RelationshipEntry
relationshipEntry in _cache.FindRelationshipsByKey(EntityKey))
3037
foreach (
RelationshipEntry
relationshipEntry in _cache.CopyOfRelationshipsByKey(this.EntityKey))
System\Data\Objects\ObjectStateEntryDbDataRecord.cs (2)
47
internal ObjectStateEntryDbDataRecord(
RelationshipEntry
cacheEntry)
231
return (_cacheEntry as
RelationshipEntry
).GetOriginalRelationValue(ordinal);
System\Data\Objects\ObjectStateEntryDbUpdatableDataRecord.cs (2)
40
internal ObjectStateEntryDbUpdatableDataRecord(
RelationshipEntry
cacheEntry)
59
return (_cacheEntry as
RelationshipEntry
).GetCurrentRelationValue(ordinal);
System\Data\Objects\ObjectStateManager.cs (57)
45
private Dictionary<RelationshipWrapper,
RelationshipEntry
> _addedRelationshipStore;
46
private Dictionary<RelationshipWrapper,
RelationshipEntry
> _deletedRelationshipStore;
47
private Dictionary<RelationshipWrapper,
RelationshipEntry
> _unchangedRelationshipStore;
714
foreach (
RelationshipEntry
relationshipEntry in CopyOfRelationshipsByKey(keyEntry.EntityKey))
853
RelationshipEntry
relationshipEntry = relatedEnd.FindRelationshipEntryInObjectStateManager(currentWrappedTarget);
1111
List<
RelationshipEntry
> deletedRelationships = new List<
RelationshipEntry
>(_initialListSize);
1117
foreach (
RelationshipEntry
relationshipEntry in context.ObjectStateManager.FindRelationshipsByKey(sourceKey))
1129
foreach (
RelationshipEntry
relationshipEntry in context.ObjectStateManager.FindRelationshipsByKey(sourceKey))
1141
foreach (
RelationshipEntry
deletedEntry in deletedRelationships)
1182
List<
RelationshipEntry
> entriesToDetach = null;
1183
List<
RelationshipEntry
> entriesToUpdate = null;
1184
foreach (
RelationshipEntry
relationshipEntry in manager.FindRelationshipsByKey(sourceKey))
1195
entriesToUpdate = new List<
RelationshipEntry
>(_initialListSize);
1226
entriesToDetach = new List<
RelationshipEntry
>(_initialListSize);
1240
entriesToDetach = new List<
RelationshipEntry
>(_initialListSize);
1249
entriesToDetach = new List<
RelationshipEntry
>(_initialListSize);
1277
foreach (
RelationshipEntry
entryToDetach in entriesToDetach)
1290
foreach (
RelationshipEntry
relationshipEntry in entriesToUpdate)
1354
internal static void RemoveRelatedEndsAndDetachRelationship(
RelationshipEntry
relationshipToRemove, bool setIsLoaded)
1377
private static void UnloadReferenceRelatedEnds(
RelationshipEntry
relationshipEntry)
1387
private static void UnloadReferenceRelatedEnds(ObjectStateManager cache,
RelationshipEntry
relationshipEntry, EntityKey sourceEntityKey, string targetRoleName)
1500
internal
RelationshipEntry
AddNewRelation(RelationshipWrapper wrapper, EntityState desiredState)
1504
RelationshipEntry
entry = new RelationshipEntry(this, desiredState, wrapper);
1510
internal
RelationshipEntry
AddRelation(RelationshipWrapper wrapper, EntityState desiredState)
1517
RelationshipEntry
entry = FindRelationship(wrapper);
1549
Debug.Assert(entry is
RelationshipEntry
, "unexpected type of entry");
1550
return (
RelationshipEntry
)entry;
1556
private void AddRelationshipToLookup(
RelationshipEntry
relationship)
1570
private void AddRelationshipEndToLookup(EntityKey key,
RelationshipEntry
relationship)
1582
private void DeleteRelationshipFromLookup(
RelationshipEntry
relationship)
1595
private void DeleteRelationshipEndFromLookup(EntityKey key,
RelationshipEntry
relationship)
1605
internal
RelationshipEntry
FindRelationship(RelationshipSet relationshipSet,
1616
internal
RelationshipEntry
FindRelationship(RelationshipWrapper relationshipWrapper)
1618
RelationshipEntry
entry = null;
1630
internal
RelationshipEntry
DeleteRelationship(RelationshipSet relationshipSet,
1634
RelationshipEntry
entry = FindRelationship(relationshipSet, roleAndKey1, roleAndKey2);
1658
internal
RelationshipEntry
[] CopyOfRelationshipsByKey(EntityKey key)
2003
RelationshipEntry
[] relationshipEnds = null;
2008
foreach (
RelationshipEntry
relationshipEntry in relationshipEnds)
2027
foreach (
RelationshipEntry
relationshipEntry in relationshipEnds)
2081
RelationshipEntry
[] relationshipEnds = entry.GetRelationshipEnds().ToArray();
2082
foreach (
RelationshipEntry
relationshipEntry in relationshipEnds)
2098
foreach (
RelationshipEntry
relationshipEntry in relationshipEnds)
2286
RelationshipEntry
relationshipEntry = this.FindRelationship(relationshipWrapper);
2348
private
RelationshipEntry
CreateRelationship(EntityEntry targetEntry, RelatedEnd relatedEnd, RelationshipWrapper relationshipWrapper, EntityState requestedState)
2352
RelationshipEntry
relationshipEntry = null;
2680
internal void ChangeState(
RelationshipEntry
entry, EntityState oldState, EntityState newState)
2685
DeleteRelationshipFromLookup((
RelationshipEntry
)entry);
2714
foreach (
RelationshipEntry
relationshipEntry in CopyOfRelationshipsByKey(entry.EntityKey))
2754
private void AddRelationshipEntryToDictionary(
RelationshipEntry
entry, EntityState state)
2759
Dictionary<RelationshipWrapper,
RelationshipEntry
> dictionaryToAdd = null;
2765
_unchangedRelationshipStore = new Dictionary<RelationshipWrapper,
RelationshipEntry
>();
2772
_addedRelationshipStore = new Dictionary<RelationshipWrapper,
RelationshipEntry
>();
2779
_deletedRelationshipStore = new Dictionary<RelationshipWrapper,
RelationshipEntry
>();
2868
private void RemoveObjectStateEntryFromDictionary(
RelationshipEntry
entry, EntityState state)
2871
Dictionary<RelationshipWrapper,
RelationshipEntry
> dictionaryContainingEntry = null;
System\Data\Objects\RelationshipEntry.cs (7)
30
private
RelationshipEntry
_nextKey0;
31
private
RelationshipEntry
_nextKey1;
472
foreach (
RelationshipEntry
relationshipEntry in _cache.FindRelationshipsByKey(entityKey))
705
internal
RelationshipEntry
GetNextRelationshipEnd(EntityKey entityKey)
712
internal void SetNextRelationshipEnd(EntityKey entityKey,
RelationshipEntry
nextEnd)
729
internal
RelationshipEntry
NextKey0
739
internal
RelationshipEntry
NextKey1