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