Base:
property
Entity
System.Data.Objects.ObjectStateEntry.Entity
55 references to Entity
System.Data.Entity (55)
System\Data\Common\Internal\Materialization\Shaper.cs (1)
746
Debug.Assert(null != existingEntry.
Entity
, "ObjectStateEntry without Entity");
System\Data\Objects\DataClasses\RelatedEnd.cs (2)
940
if (null == stateEntry || !Object.ReferenceEquals(stateEntry.
Entity
, wrappedEntity.Entity))
1576
Debug.Assert(cacheEntry == null || cacheEntry.
Entity
== wrappedEntity.Entity,
System\Data\Objects\EntityEntry.cs (24)
87
_requiresScalarChangeTracking =
Entity
!= null && !(
Entity
is IEntityWithChangeTracker);
89
_requiresComplexChangeTracking =
Entity
!= null &&
91
(WrappedEntity.IdentityType !=
Entity
.GetType() &&
94
_requiresAnyChangeTracking =
Entity
!= null &&
95
(!(
Entity
is IEntityWithRelationships) ||
445
Debug.Assert(
Entity
!= null, "Non-relationship entries should have a non-null entity.");
1494
Debug.Assert(this.
Entity
is IEntityWithChangeTracker, "for POCO objects the snapshot should contain all original values");
1601
tmpChangingObject = this.
Entity
;
1602
if (WrappedEntity.IdentityType !=
Entity
.GetType() && // Is a proxy
1603
Entity
is IEntityWithChangeTracker && // Is a full proxy
1691
this.AddComplexObjectSnapshot(this.
Entity
, i, currentValue);
1794
throw new InvalidOperationException(System.Data.Entity.Strings.ObjectStateEntry_ComplexObjectUsedMultipleTimes(this.
Entity
.GetType().FullName, complexObject.GetType().FullName));
1826
var oldComplexValue = this.GetComplexObjectSnapshot(this.
Entity
, ordinal);
1854
this.UpdateComplexObjectSnapshot(member, this.
Entity
, ordinal, currentValue);
2148
throw new EntityException(System.Data.Entity.Strings.ObjectStateEntry_UnableToEnumerateCollection(n.Name, this.
Entity
.GetType().FullName));
2248
Debug.Assert(!(this.
Entity
is IEntityWithRelationships), "Entity shouldn't implement IEntityWithRelationships");
2271
throw new EntityException(System.Data.Entity.Strings.ObjectStateEntry_UnableToEnumerateCollection(n.Name, this.
Entity
.GetType().FullName));
3191
_cache.OnObjectStateManagerChanged(CollectionChangeAction.Add,
Entity
);
3206
_cache.OnObjectStateManagerChanged(CollectionChangeAction.Add,
Entity
);
3219
_cache.OnObjectStateManagerChanged(CollectionChangeAction.Add,
Entity
);
3354
throw EntityUtil.EntitiesHaveDifferentType(this.
Entity
.GetType().FullName, wrappedCurrentEntity.Entity.GetType().FullName);
3382
throw EntityUtil.EntitiesHaveDifferentType(this.
Entity
.GetType().FullName, wrappedOriginalEntity.Entity.GetType().FullName);
3490
_cache.TransactionManager.EntityBeingReparented =
Entity
;
System\Data\Objects\Internal\SnapshotChangeTrackingStrategy.cs (1)
59
if (Object.ReferenceEquals(target, entry.
Entity
))
System\Data\Objects\ObjectContext.cs (11)
571
if (!Object.ReferenceEquals(existingEntry.
Entity
, wrappedEntity.Entity))
631
Debug.Assert((object)existingEntry.
Entity
== (object)entity, "FindEntityEntry should return null if existing entry contains a different object.");
918
return (TEntity)ose.
Entity
;
970
throw EntityUtil.EntitiesHaveDifferentType(ose.
Entity
.GetType().FullName, originalEntity.GetType().FullName);
980
return (TEntity)ose.
Entity
;
1012
Debug.Assert((object)existingEntry.
Entity
== (object)entity, "FindEntityEntry should return null if existing entry contains a different object.");
1166
Debug.Assert(!Object.ReferenceEquals(entry.
Entity
, wrappedEntity.Entity));
1715
if (cacheEntry == null || !object.ReferenceEquals(cacheEntry.
Entity
, entity))
1764
!object.ReferenceEquals(cacheEntry.
Entity
, entity) ||
1765
cacheEntry.
Entity
== null) // this condition includes key entries and relationship entries
2479
value = entry.
Entity
;
System\Data\Objects\ObjectStateManager.cs (16)
392
if (existingEntry.
Entity
!= wrappedObject.Entity)
442
OnObjectStateManagerChanged(CollectionChangeAction.Add, newEntry.
Entity
);
674
OnObjectStateManagerChanged(CollectionChangeAction.Add, keyEntry.
Entity
);
1442
OnObjectStateManagerChanged(CollectionChangeAction.Add, newEntry.
Entity
);
1688
Debug.Assert(!(entry.
Entity
is IEntityWithKey), "_keylessEntityStore contains an entry that implement IEntityWithKey");
1719
if (null != entry.
Entity
&& //Skip span stub key entry
1720
!(entry.
Entity
is IEntityWithKey))
1724
if (_keylessEntityStore.TryGetValue(entry.
Entity
, out keylessEntry))
1961
Debug.Assert(entry.
Entity
!= null, "must have entity, can't be entity stub in added state");
2611
if (entry != null && !object.ReferenceEquals(entity, entry.
Entity
))
2748
OnEntityDeleted(CollectionChangeAction.Remove, entry.
Entity
);
2749
OnObjectStateManagerChanged(CollectionChangeAction.Remove, entry.
Entity
);
2851
if (null != entry.
Entity
&& !(entry.
Entity
is IEntityWithKey))
2857
if (!_keylessEntityStore.ContainsKey(entry.
Entity
))
2859
_keylessEntityStore.Add(entry.
Entity
, entry);