3 instantiations of EntityEntry
System.Data.Entity (3)
System\Data\Objects\ObjectStateManager.cs (3)
293
entry = new
EntityEntry
(entityKey, entitySet, this, typeMetadata);
429
EntityEntry newEntry = new
EntityEntry
(wrappedObject, entityKey, entitySet, this, typeMetadata, isAdded ? EntityState.Added : EntityState.Unchanged);
1432
EntityEntry newEntry = new
EntityEntry
(wrappedObject, entityKey, entitySet, this, typeMetadata, EntityState.Unchanged);
254 references to EntityEntry
System.Data.Entity (254)
System\Data\Common\Internal\Materialization\Shaper.cs (4)
152
EntityEntry
existingEntry = this.Context.ObjectStateManager.FindEntityEntry(entityKey);
200
EntityEntry
existingEntry = this.Context.ObjectStateManager.FindEntityEntry(entityKey);
312
EntityEntry
targetEntry = null;
741
private void UpdateEntry<TEntity>(IEntityWrapper wrappedEntity,
EntityEntry
existingEntry)
System\Data\Objects\DataClasses\EntityObject.cs (2)
138
EntityEntry
entry = EntityChangeTracker as
EntityEntry
;
System\Data\Objects\DataClasses\EntityReference.cs (3)
209
EntityEntry
targetEntry = manager.FindEntityEntry(value);
354
internal void SetCachedForeignKey(EntityKey newForeignKey,
EntityEntry
source)
633
EntityEntry
entry = WrappedOwner.ObjectStateEntry;
System\Data\Objects\DataClasses\EntityReference_TResultType.cs (3)
286
EntityEntry
existingEntry = manager.FindEntityEntry(DetachedEntityKey);
477
EntityEntry
ownerEntry = WrappedOwner.Context.ObjectStateManager.GetEntityEntry(WrappedOwner.Entity);
632
EntityEntry
.AddOrIncreaseCounter(
System\Data\Objects\DataClasses\RelatedEnd.cs (17)
336
EntityEntry
stateEntry = _context.ObjectStateManager.FindEntityEntry(_wrappedOwner.Entity);
674
EntityEntry
entry = ObjectContext.ObjectStateManager.FindEntityEntry(_wrappedOwner.Entity);
865
EntityEntry
ownerEntry = stateManager.FindEntityEntry(_wrappedOwner.Entity);
882
EntityEntry
targetEntry = stateManager.FindEntityEntry(((EntityReference)targetRelatedEnd).WrappedOwner.Entity);
909
EntityEntry
stateEntry = this.ObjectContext.ObjectStateManager.GetEntityEntry(_wrappedOwner.Entity);
939
EntityEntry
stateEntry = ObjectContext.ObjectStateManager.FindEntityEntry(wrappedEntity.Entity);
1116
EntityEntry
entry = this.ObjectContext.ObjectStateManager.FindEntityEntry(wrappedEntity.Entity);
1377
EntityEntry
entry = _context.ObjectStateManager.GetEntityEntry(wrappedEntity.Entity);
1575
EntityEntry
cacheEntry = _context.ObjectStateManager.FindEntityEntry(wrappedEntity.Entity);
1683
EntityEntry
entry = this.ObjectContext.ObjectStateManager.GetEntityEntry(wrappedEntity.Entity);
1698
EntityEntry
dependentEntry = WrappedOwner.ObjectStateEntry;
1756
EntityEntry
cacheEntry = _context.ObjectStateManager.FindEntityEntry(wrappedEntity.Entity);
1797
internal bool CheckReferentialConstraintProperties(
EntityEntry
ownerEntry)
1868
EntityEntry
dependent = wrappedRelatedEntity.ObjectStateEntry;
2181
EntityEntry
entry;
2221
private static
EntityEntry
MarkEntityAsDeletedInObjectStateManager(IEntityWrapper wrappedEntity)
2224
EntityEntry
entry = null;
System\Data\Objects\DataClasses\RelationshipManager.cs (4)
1092
EntityEntry
entry;
1271
EntityEntry
entry = wrappedOwner.Context.ObjectStateManager.FindEntityEntry(ownerKey);
1292
EntityEntry
entry = wrappedOwner.Context.ObjectStateManager.FindEntityEntry(ownerKey);
1362
internal void CheckReferentialConstraintProperties(
EntityEntry
ownerEntry)
System\Data\Objects\EntityEntry.cs (27)
721
internal void UpdateRelationshipEnds(EntityKey oldKey,
EntityEntry
promotedEntry)
767
private readonly
EntityEntry
_entityEntry;
769
internal RelationshipEndEnumerable(
EntityEntry
entityEntry)
821
private readonly
EntityEntry
_entityEntry;
824
internal RelationshipEndEnumerator(
EntityEntry
entityEntry)
1420
internal
EntityEntry
GetOtherEndOfRelationship(RelationshipEntry relationshipEntry)
2114
Debug.Assert(principalEntry is
EntityEntry
, "Existing entry for an entity must be an EntityEntry, not a RelationshipEntry");
2115
reference.UpdateForeignKeyValues(WrappedEntity, ((
EntityEntry
)principalEntry).WrappedEntity, changedFKs, forceChange: false);
2172
EntityEntry
relatedEntry = this.ObjectStateManager.FindEntityEntry(o);
2198
EntityEntry
principalEntry = null;
2199
EntityEntry
dependentEntry = null;
2340
EntityEntry
relatedEntry,
2557
EntityEntry
relatedEntry = _cache.GetEntityEntry(targetKey);
2582
EntityEntry
relatedEntry = _cache.GetEntityEntry(targetKey);
2644
EntityEntry
otherEnd = this.GetOtherEndOfRelationship(relationshipEntry);
2652
EntityEntry
relatedEntry = _cache.GetEntityEntry(entityKey);
2718
EntityEntry
otherEnd = this.GetOtherEndOfRelationship(relationshipEntry);
2746
EntityEntry
.AddOrIncreaseCounter(properties, constraint.ToProperties[i].Name, pair.Value);
2790
EntityEntry
otherEnd = this.GetOtherEndOfRelationship(relationshipEntry);
3466
EntityEntry
existingPrincipalEntry = existingPrincipal.ObjectStateEntry;
3543
EntityEntry
principalEntry;
3689
private void FixupForeignKeysByReference(List<
EntityEntry
> visited)
3707
EntityEntry
principalEntry = existingPrincipal.ObjectStateEntry;
3712
visited = visited ?? new List<
EntityEntry
>();
3758
EntityEntry
dependentEntry = dependent.ObjectStateEntry;
3924
EntityEntry
entry;
3940
EntityEntry
entry;
System\Data\Objects\Internal\BaseEntityWrapper.cs (5)
195
public
EntityEntry
ObjectStateEntry
223
public abstract void TakeSnapshot(
EntityEntry
entry);
224
public abstract void TakeSnapshotOfRelationships(
EntityEntry
entry);
232
public abstract void SetCurrentValue(
EntityEntry
entry, StateManagerMemberMetadata member, int ordinal, object target, object value);
233
public abstract void UpdateCurrentValueRecord(object value,
EntityEntry
entry);
System\Data\Objects\Internal\EntityWithChangeTrackerStrategy.cs (3)
40
public void TakeSnapshot(
EntityEntry
entry)
49
public void SetCurrentValue(
EntityEntry
entry, StateManagerMemberMetadata member, int ordinal, object target, object value)
55
public void UpdateCurrentValueRecord(object value,
EntityEntry
entry)
System\Data\Objects\Internal\EntityWrapper.cs (5)
66
public override void TakeSnapshotOfRelationships(
EntityEntry
entry)
127
public override void TakeSnapshotOfRelationships(
EntityEntry
entry)
218
public override void TakeSnapshot(
EntityEntry
entry)
312
public override void SetCurrentValue(
EntityEntry
entry, StateManagerMemberMetadata member, int ordinal, object target, object value)
318
public override void UpdateCurrentValueRecord(object value,
EntityEntry
entry)
System\Data\Objects\Internal\EntityWrapperFactory.cs (4)
186
EntityEntry
existingEntry;
198
internal static IEntityWrapper WrapEntityUsingContextGettingEntry(object entity, ObjectContext context, out
EntityEntry
existingEntry)
213
EntityEntry
existingEntry;
226
internal static IEntityWrapper WrapEntityUsingStateManagerGettingEntry(object entity, ObjectStateManager stateManager, out
EntityEntry
existingEntry)
System\Data\Objects\Internal\ForeignKeyFactory.cs (2)
77
public static EntityKey CreateKeyFromForeignKeyValues(
EntityEntry
dependentEntry, RelatedEnd relatedEnd)
94
public static EntityKey CreateKeyFromForeignKeyValues(
EntityEntry
dependentEntry, ReferentialConstraint constraint, EntitySet principalEntitySet, bool useOriginalValues)
System\Data\Objects\Internal\IChangeTrackingStrategy.cs (3)
31
void TakeSnapshot(
EntityEntry
entry);
42
void SetCurrentValue(
EntityEntry
entry, StateManagerMemberMetadata member, int ordinal, object target, object value);
50
void UpdateCurrentValueRecord(object value,
EntityEntry
entry);
System\Data\Objects\Internal\IEntityWrapper.cs (5)
43
EntityEntry
ObjectStateEntry { get; set; }
108
void TakeSnapshot(
EntityEntry
entry);
114
void TakeSnapshotOfRelationships(
EntityEntry
entry);
176
void SetCurrentValue(
EntityEntry
entry, StateManagerMemberMetadata member, int ordinal, object target, object value);
192
void UpdateCurrentValueRecord(object value,
EntityEntry
entry);
System\Data\Objects\Internal\LightweightEntityWrapper.cs (4)
74
public override void TakeSnapshot(
EntityEntry
entry)
79
public override void TakeSnapshotOfRelationships(
EntityEntry
entry)
152
public override void SetCurrentValue(
EntityEntry
entry, StateManagerMemberMetadata member, int ordinal, object target, object value)
158
public override void UpdateCurrentValueRecord(object value,
EntityEntry
entry)
System\Data\Objects\Internal\NullEntityWrapper.cs (5)
61
public
EntityEntry
ObjectStateEntry
139
public void TakeSnapshot(
EntityEntry
entry)
144
public void TakeSnapshotOfRelationships(
EntityEntry
entry)
179
public void SetCurrentValue(
EntityEntry
entry, StateManagerMemberMetadata member, int ordinal, object target, object value)
197
public void UpdateCurrentValueRecord(object value,
EntityEntry
entry)
System\Data\Objects\Internal\SnapshotChangeTrackingStrategy.cs (3)
45
public void TakeSnapshot(
EntityEntry
entry)
54
public void SetCurrentValue(
EntityEntry
entry, StateManagerMemberMetadata member, int ordinal, object target, object value)
97
public void UpdateCurrentValueRecord(object value,
EntityEntry
entry)
System\Data\Objects\Internal\TransactionManager.cs (2)
33
internal Dictionary<object,
EntityEntry
> PromotedKeyEntries
262
this.PromotedKeyEntries = new Dictionary<object,
EntityEntry
>();
System\Data\Objects\ObjectContext.cs (20)
512
private void VerifyRootForAdd(bool doAttach, string entitySetName, IEntityWrapper wrappedEntity,
EntityEntry
existingEntry, out EntitySet entitySet, out bool isNoOperation)
615
EntityEntry
existingEntry;
668
EntityEntry
entry = this.ObjectStateManager.FindEntityEntry(wrappedEntity.Entity);
712
EntityEntry
entry = this.ObjectStateManager.AddEntry(wrappedEntity, (EntityKey)null, entitySet, argumentName, true);
910
EntityEntry
ose = this.ObjectStateManager.FindEntityEntry(key);
955
EntityEntry
ose = this.ObjectStateManager.FindEntityEntry(key);
996
EntityEntry
existingEntry;
1130
EntityEntry
entry = ObjectStateManager.FindEntityEntry(key);
1239
private void AddRefreshKey(object entityLike, Dictionary<EntityKey,
EntityEntry
> entities, Dictionary<EntitySet, List<EntityKey>> currentKeys)
1714
EntityEntry
cacheEntry = this.ObjectStateManager.FindEntityEntry(entity);
1762
EntityEntry
cacheEntry = this.ObjectStateManager.FindEntityEntry(entity);
2016
Dictionary<EntityKey,
EntityEntry
> entities,
2022
EntityEntry
entry = ObjectStateManager.FindEntityEntry(key);
2058
Dictionary<EntityKey,
EntityEntry
> entities = new Dictionary<EntityKey,
EntityEntry
>(RefreshEntitiesSize(collection));
2099
foreach (KeyValuePair<EntityKey,
EntityEntry
> item in entities)
2129
foreach (KeyValuePair<EntityKey,
EntityEntry
> item in entities)
2162
private int BatchRefreshEntitiesByKey(RefreshMode refreshMode, Dictionary<EntityKey,
EntityEntry
> trackedEntities, EntitySet targetSet, List<EntityKey> targetKeys, int startFrom)
2247
EntityEntry
entry = ObjectStateManager.FindEntityEntry(entity);
2471
EntityEntry
entry;
System\Data\Objects\ObjectStateEntryDbDataRecord.cs (2)
27
internal ObjectStateEntryDbDataRecord(
EntityEntry
cacheEntry, StateManagerTypeMetadata metadata, object userObject)
235
return (_cacheEntry as
EntityEntry
).GetOriginalEntityValue(_metadata, ordinal, _userObject, ObjectStateValueRecord.OriginalReadonly);
System\Data\Objects\ObjectStateEntryDbUpdatableDataRecord.cs (3)
22
internal ObjectStateEntryDbUpdatableDataRecord(
EntityEntry
cacheEntry, StateManagerTypeMetadata metadata, object userObject)
63
return (_cacheEntry as
EntityEntry
).GetCurrentEntityValue(_metadata, ordinal, _userObject, ObjectStateValueRecord.CurrentUpdatable);
75
(_cacheEntry as
EntityEntry
).SetCurrentEntityValue(_metadata, ordinal, _userObject, value);
System\Data\Objects\ObjectStateEntryOriginalDbUpdatableDataRecord.cs (8)
24
internal ObjectStateEntryOriginalDbUpdatableDataRecord_Internal(
EntityEntry
cacheEntry, StateManagerTypeMetadata metadata, object userObject)
45
return (_cacheEntry as
EntityEntry
).GetOriginalEntityValue(_metadata, ordinal, _userObject, ObjectStateValueRecord.OriginalUpdatableInternal);
50
(_cacheEntry as
EntityEntry
).SetOriginalEntityValue(_metadata, ordinal, _userObject, value);
64
internal ObjectStateEntryOriginalDbUpdatableDataRecord_Public(
EntityEntry
cacheEntry, StateManagerTypeMetadata metadata, object userObject, int parentEntityPropertyIndex)
73
return (_cacheEntry as
EntityEntry
).GetOriginalEntityValue(_metadata, ordinal, _userObject, ObjectStateValueRecord.OriginalUpdatablePublic, GetPropertyIndex(ordinal));
90
EntityEntry
entry = _cacheEntry as
EntityEntry
;
131
return _parentEntityPropertyIndex ==
EntityEntry
.s_EntityRoot ? ordinal : _parentEntityPropertyIndex;
System\Data\Objects\ObjectStateManager.cs (115)
37
private Dictionary<EntityKey,
EntityEntry
> _addedEntityStore;
38
private Dictionary<EntityKey,
EntityEntry
> _modifiedEntityStore;
39
private Dictionary<EntityKey,
EntityEntry
> _deletedEntityStore;
40
private Dictionary<EntityKey,
EntityEntry
> _unchangedEntityStore;
41
private Dictionary<object,
EntityEntry
> _keylessEntityStore;
68
private readonly Dictionary<EntityKey, HashSet<
EntityEntry
>> _danglingForeignKeys = new Dictionary<EntityKey, HashSet<
EntityEntry
>>();
69
private HashSet<
EntityEntry
> _entriesWithConceptualNulls;
276
internal
EntityEntry
AddKeyEntry(EntityKey entityKey, EntitySet entitySet)
283
EntityEntry
entry = FindEntityEntry(entityKey);
329
internal
EntityEntry
AddEntry(IEntityWrapper wrappedObject, EntityKey passedKey, EntitySet entitySet, string argumentName, bool isAdded)
387
EntityEntry
existingEntry;
429
EntityEntry
newEntry = new EntityEntry(wrappedObject, entityKey, entitySet, this, typeMetadata, isAdded ? EntityState.Added : EntityState.Unchanged);
454
internal void FixupReferencesByForeignKeys(
EntityEntry
newEntry, bool replaceAddedRefs = false)
468
foreach (
EntityEntry
foundEntry in GetNonFixedupEntriesContainingForeignKey(newEntry.EntityKey))
481
internal void AddEntryContainingForeignKeyToIndex(EntityKey foreignKey,
EntityEntry
entry)
483
HashSet<
EntityEntry
> danglingEntries;
486
danglingEntries = new HashSet<
EntityEntry
>();
494
internal void AssertEntryDoesNotExistInForeignKeyIndex(
EntityEntry
entry)
496
foreach (
var
dFkEntry in _danglingForeignKeys.SelectMany(kv => kv.Value))
517
foreach (
var
entry in _danglingForeignKeys.SelectMany(kv => kv.Value))
531
internal void RemoveEntryFromForeignKeyIndex(EntityKey foreignKey,
EntityEntry
entry)
533
HashSet<
EntityEntry
> danglingEntries;
557
internal IEnumerable<
EntityEntry
> GetNonFixedupEntriesContainingForeignKey(EntityKey foreignKey)
559
HashSet<
EntityEntry
> foundEntries;
566
return Enumerable.Empty<
EntityEntry
>();
578
internal void RememberEntryWithConceptualNull(
EntityEntry
entry)
582
_entriesWithConceptualNulls = new HashSet<
EntityEntry
>();
599
internal bool EntryHasConceptualNull(
EntityEntry
entry)
608
internal void ForgetEntryWithConceptualNull(
EntityEntry
entry, bool resetAllKeys)
638
EntityEntry
keyEntry,
686
internal void PromoteKeyEntry(
EntityEntry
keyEntry,
723
EntityEntry
targetEntry = keyEntry.GetOtherEndOfRelationship(relationshipEntry);
1311
EntityEntry
targetEntry = manager.GetEntityEntry(targetKey);
1389
EntityEntry
entry = cache.GetEntityEntry(sourceEntityKey);
1408
internal
EntityEntry
AttachEntry(EntityKey entityKey, IEntityWrapper wrappedObject, EntitySet entitySet, string argumentName)
1432
EntityEntry
newEntry = new EntityEntry(wrappedObject, entityKey, entitySet, this, typeMetadata, EntityState.Unchanged);
1574
EntityEntry
entry = GetEntityEntry(key);
1600
EntityEntry
entry = GetEntityEntry(key);
1646
internal void DeleteKeyEntry(
EntityEntry
keyEntry)
1667
internal
EntityEntry
.RelationshipEndEnumerable FindRelationshipsByKey(EntityKey key)
1669
return new
EntityEntry
.RelationshipEndEnumerable((
EntityEntry
)FindEntityEntry(key));
1686
foreach (
EntityEntry
entry in _keylessEntityStore.Values)
1689
EntityEntry
entrya;
1712
Dictionary<EntityKey,
EntityEntry
>[] stores = { _unchangedEntityStore, _modifiedEntityStore, _addedEntityStore, _deletedEntityStore };
1713
foreach (Dictionary<EntityKey,
EntityEntry
> store in stores)
1717
foreach (
EntityEntry
entry in store.Values)
1722
EntityEntry
keylessEntry;
1742
private bool TryGetEntryFromKeylessStore(object entity, out
EntityEntry
entryRef)
1898
private IList<
EntityEntry
> GetEntityEntriesForDetectChanges()
1911
List<
EntityEntry
> entries = null; // Will be lazy initialized if needed.
1928
private void GetEntityEntriesForDetectChanges(Dictionary<EntityKey,
EntityEntry
> entityStore, ref List<
EntityEntry
> entries)
1932
foreach (
var
entry in entityStore.Values)
1938
entries = new List<
EntityEntry
>(GetMaxEntityEntriesForDetectChanges());
1957
internal void FixupKey(
EntityEntry
entry)
1992
EntityEntry
existingEntry = FindEntityEntry(newKey);
2066
internal void ReplaceKeyWithTemporaryKey(
EntityEntry
entry)
2112
private void ResetEntityKey(
EntityEntry
entry, EntityKey value)
2156
EntityEntry
entry = null;
2202
EntityEntry
sourceEntry;
2203
EntityEntry
targetEntry;
2230
EntityEntry
sourceEntry;
2231
EntityEntry
targetEntry;
2264
EntityEntry
sourceEntry;
2265
EntityEntry
targetEntry;
2275
EntityEntry
sourceEntry,
2276
EntityEntry
targetEntry,
2315
private void VerifyParametersForChangeRelationshipState(object sourceEntity, object targetEntity, out
EntityEntry
sourceEntry, out
EntityEntry
targetEntry)
2324
private void VerifyInitialStateForChangeRelationshipState(
EntityEntry
sourceEntry,
EntityEntry
targetEntry, RelatedEnd relatedEnd, EntityState relationshipState)
2348
private RelationshipEntry CreateRelationship(
EntityEntry
targetEntry, RelatedEnd relatedEnd, RelationshipWrapper relationshipWrapper, EntityState requestedState)
2391
private
EntityEntry
GetEntityEntryByObjectOrEntityKey(object o)
2394
EntityEntry
entry = (key != null) ?
2437
internal
EntityEntry
GetEntityEntry(EntityKey key)
2439
EntityEntry
entry;
2464
internal
EntityEntry
GetEntityEntry(object entity)
2469
EntityEntry
entry = FindEntityEntry(entity);
2532
EntityEntry
dependentEntry;
2549
EntityEntry
entityEntry;
2555
internal bool TryGetEntityEntry(EntityKey key, out
EntityEntry
entry)
2574
internal
EntityEntry
FindEntityEntry(EntityKey key)
2576
EntityEntry
entry = null;
2588
internal
EntityEntry
FindEntityEntry(object entity)
2592
EntityEntry
entry = null;
2704
internal void ChangeState(
EntityEntry
entry, EntityState oldState, EntityState newState)
2791
private void AddEntityEntryToDictionary(
EntityEntry
entry, EntityState state)
2800
Dictionary<EntityKey,
EntityEntry
> dictionaryToAdd = null;
2806
_unchangedEntityStore = new Dictionary<EntityKey,
EntityEntry
>();
2814
_addedEntityStore = new Dictionary<EntityKey,
EntityEntry
>();
2822
_deletedEntityStore = new Dictionary<EntityKey,
EntityEntry
>();
2830
_modifiedEntityStore = new Dictionary<EntityKey,
EntityEntry
>();
2847
private void AddEntryToKeylessStore(
EntityEntry
entry)
2855
_keylessEntityStore = new Dictionary<object,
EntityEntry
>(new ObjectReferenceEqualityComparer());
2913
private void RemoveObjectStateEntryFromDictionary(
EntityEntry
entry, EntityState state)
2915
Dictionary<EntityKey,
EntityEntry
> dictionaryContainingEntry = null;
3112
private void DetectConflicts(IList<
EntityEntry
> entries)
3115
foreach (
EntityEntry
entry in entries)
3256
EntityEntry
relatedEntry = FindEntityEntry(addedEntity.Entity);
3270
EntityEntry
.AddOrIncreaseCounter(
3317
private void DetectChangesInForeignKeys(IList<
EntityEntry
> entries)
3319
foreach (
var
entry in entries)
3328
private void AlignChangesInRelationships(IList<
EntityEntry
> entries)
3334
private void PerformAdd(IList<
EntityEntry
> entries)
3338
foreach (
EntityEntry
entry in entries)
3372
EntityEntry
relatedEntry;
3459
private void PerformDelete(IList<
EntityEntry
> entries)
3463
foreach (
EntityEntry
entry in entries)
3497
EntityEntry
relatedEntry;
3685
private void DetectChangesInNavigationProperties(IList<
EntityEntry
> entries)
3689
foreach (
var
entry in entries)
3699
private void DetectChangesInScalarAndComplexProperties(IList<
EntityEntry
> entries)
3701
foreach (
var
entry in entries)
System\Data\Objects\ObjectViewQueryResultData.cs (1)
201
EntityEntry
stateEntry = _objectContext.ObjectStateManager.FindEntityEntry(item);
System\Data\Objects\RelationshipEntry.cs (4)
466
EntityEntry
relatedEntry = _cache.GetEntityEntry(entityKey);
503
EntityEntry
entry1 = _cache.GetEntityEntry((EntityKey)GetCurrentRelationValue(0));
505
EntityEntry
entry2 = _cache.GetEntityEntry((EntityKey)GetCurrentRelationValue(1));
606
internal void ChangeRelationshipState(
EntityEntry
targetEntry, RelatedEnd relatedEnd, EntityState requestedState)