86 references to WrappedEntity
System.Data.Entity (86)
System\Data\Common\Internal\Materialization\Shaper.cs (8)
157
result = existingEntry.
WrappedEntity
;
204
if (typeof(TEntity) != existingEntry.
WrappedEntity
.IdentityType)
206
throw EntityUtil.RecyclingEntity(existingEntry.EntityKey, typeof(TEntity), existingEntry.
WrappedEntity
.IdentityType);
213
result = existingEntry.
WrappedEntity
;
333
targetEntry.
WrappedEntity
,
378
targetEntry.
WrappedEntity
,
749
if (clrType != existingEntry.
WrappedEntity
.IdentityType)
751
throw EntityUtil.RecyclingEntity(existingEntry.EntityKey, clrType, existingEntry.
WrappedEntity
.IdentityType);
System\Data\Objects\DataClasses\EntityReference.cs (2)
220
this.ReferenceValue = targetEntry.
WrappedEntity
;
238
EntityKey ownerKey = ValidateOwnerWithRIConstraints(targetEntry == null ? null : targetEntry.
WrappedEntity
, value, checkBothEnds: true);
System\Data\Objects\DataClasses\EntityReference_TResultType.cs (1)
319
IEntityWrapper wrappedTarget = existingEntry.
WrappedEntity
;
System\Data\Objects\EntityEntry.cs (27)
91
(
WrappedEntity
.IdentityType != Entity.GetType() &&
523
if (
WrappedEntity
.Entity == null)
527
return
WrappedEntity
.RelationshipManager;
1131
RelatedEnd relatedEnd = this.
WrappedEntity
.RelationshipManager.GetRelatedEndInternal(relationshipName, targetRoleName);
1602
if (
WrappedEntity
.IdentityType != Entity.GetType() && // Is a proxy
1607
_cache.EntityInvokingFKSetter =
WrappedEntity
.Entity;
2107
var principal =
WrappedEntity
.GetNavigationPropertyValue(reference);
2115
reference.UpdateForeignKeyValues(
WrappedEntity
, ((EntityEntry)principalEntry).
WrappedEntity
, changedFKs, forceChange: false);
2138
object val = this.
WrappedEntity
.GetNavigationPropertyValue(relatedEnd);
2257
RelatedEnd relatedEnd = this.
WrappedEntity
.RelationshipManager.GetRelatedEndInternal(n.RelationshipType.FullName, n.ToEndMember.Name);
2260
object val = this.
WrappedEntity
.GetNavigationPropertyValue(relatedEnd);
2348
IEntityWrapper relatedWrapper = relatedEntry.
WrappedEntity
; ;
2352
EntityKey permanentKeyOwner = this.ObjectStateManager.GetPermanentKey(relatedEntry.
WrappedEntity
, relatedEndTo, this.
WrappedEntity
);
2541
EntityReference relatedEnd =
WrappedEntity
.RelationshipManager.GetRelatedEndInternal(
3061
this.
WrappedEntity
.RelationshipManager.VerifyIsNotRelated();
3352
if (this.
WrappedEntity
.IdentityType != wrappedCurrentEntity.IdentityType)
3380
if (this.
WrappedEntity
.IdentityType != wrappedOriginalEntity.IdentityType)
3425
EntityReference relatedEnd =
WrappedEntity
.RelationshipManager.GetRelatedEndInternal(
3547
(replaceExistingRef || WillNotRefSteal(relatedEnd, principalEntry.
WrappedEntity
)) &&
3548
relatedEnd.CanSetEntityType(principalEntry.
WrappedEntity
))
3566
EntityReference otherEnd = relatedEnd.GetOtherEndOfRelationship(principalEntry.
WrappedEntity
) as EntityReference;
3735
reference.UpdateForeignKeyValues(this.
WrappedEntity
, existingPrincipal, changedFKs: null, forceChange: false);
3742
reference.UpdateForeignKeyValues(this.
WrappedEntity
, principalKey);
3754
EntityKey principalKey =
WrappedEntity
.EntityKey;
3787
principalRef.UpdateForeignKeyValues(dependent,
WrappedEntity
, changedFKs: null, forceChange: false);
System\Data\Objects\Internal\EntityWithChangeTrackerStrategy.cs (1)
58
bool isProxy = entry.
WrappedEntity
.IdentityType != _entity.GetType();
System\Data\Objects\Internal\EntityWrapperFactory.cs (1)
242
return existingEntry.
WrappedEntity
;
System\Data\Objects\ObjectContext.cs (1)
968
if (ose.
WrappedEntity
.IdentityType != wrappedOriginalEntity.IdentityType)
System\Data\Objects\ObjectStateManager.cs (41)
730
targetEntry.
WrappedEntity
,
1323
targetEntry.
WrappedEntity
,
1391
if (entry.
WrappedEntity
.Entity != null)
1393
EntityReference reference = entry.
WrappedEntity
.RelationshipManager.GetRelatedEndInternal(((AssociationSet)relationshipEntry.EntitySet).ElementType.FullName, targetRoleName) as EntityReference;
2040
PromoteKeyEntry(existingEntry, entry.
WrappedEntity
, null, true, /*setIsLoaded*/ false, /*keyEntryInitialized*/ false, "AcceptChanges");
2118
EntityKey entityKey = entry.
WrappedEntity
.EntityKey;
2126
entry.
WrappedEntity
.EntityKey = value; // user will have control
2127
EntityUtil.CheckEntityKeysMatch(entry.
WrappedEntity
, value);
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);
2326
relatedEnd.VerifyType(targetEntry.
WrappedEntity
);
2357
relatedEnd.Add(targetEntry.
WrappedEntity
,
2367
relatedEnd.Add(targetEntry.
WrappedEntity
,
2722
IEntityWrapper wrappedEntity = entry.
WrappedEntity
; // we have to cache the entity before detaching it totally so we can fire event
2938
RemoveEntryFromKeylessStore(entry.
WrappedEntity
);
3123
tm.AddedRelationshipsByGraph.TryGetValue(entry.
WrappedEntity
, out addedRelationshipsByGraph);
3125
tm.AddedRelationshipsByForeignKey.TryGetValue(entry.
WrappedEntity
, out addedRelationshipsByForeignKey);
3213
if (tm.AddedRelationshipsByPrincipalKey.TryGetValue(entry.
WrappedEntity
, out addedRelationshipsByPrincipalKey))
3223
EntityKey addedKey = GetPermanentKey(entry.
WrappedEntity
, reference, addedEntity);
3237
if (tm.DeletedRelationshipsByForeignKey.TryGetValue(entry.
WrappedEntity
, out deletedRelationshipsByForeignKey))
3343
foreach (RelatedEnd relatedEnd in entry.
WrappedEntity
.RelationshipManager.Relationships)
3351
tm.AddedRelationshipsByForeignKey.TryGetValue(entry.
WrappedEntity
, out addedRelationshipsByForeignKey))
3361
if (tm.AddedRelationshipsByGraph.TryGetValue(entry.
WrappedEntity
, out addedRelationshipsByGraph))
3378
relatedEntry.
WrappedEntity
.Entity != null)
3387
entitiesToAdd.Remove(relatedEntry.
WrappedEntity
);
3389
PerformAdd(entry.
WrappedEntity
, relatedEnd, relatedEntry.
WrappedEntity
, true);
3408
PerformAdd(entry.
WrappedEntity
, relatedEnd, entityToAdd, false);
3469
foreach (RelatedEnd relatedEnd in entry.
WrappedEntity
.RelationshipManager.Relationships)
3477
tm.DeletedRelationshipsByForeignKey.TryGetValue(entry.
WrappedEntity
, out deletedRelationshipsByForeignKey))
3486
if (tm.DeletedRelationshipsByGraph.TryGetValue(entry.
WrappedEntity
, out deletedRelationshipsByGraph))
3501
relatedEntry.
WrappedEntity
.Entity != null)
3503
relatedEntity = relatedEntry.
WrappedEntity
;
3513
relatedEntry.
WrappedEntity
.Entity != null)
3518
relatedEntity = relatedEntry.
WrappedEntity
;
3531
bool preserveForeignKey = ShouldPreserveForeignKeyForDependent(entry.
WrappedEntity
, relatedEnd, relatedEntity, entitiesToDelete);
3534
if (reference != null && IsReparentingReference(entry.
WrappedEntity
, reference))
3568
bool preserveForeignKey = ShouldPreserveForeignKeyForPrincipal(entry.
WrappedEntity
, relatedEnd, entityToDelete, entitiesToDelete);
3570
if (reference != null && IsReparentingReference(entry.
WrappedEntity
, reference))
3692
if (entry.
WrappedEntity
.RequiresRelationshipChangeTracking)
System\Data\Objects\RelationshipEntry.cs (4)
504
IEntityWrapper wrappedEntity1 = entry1.
WrappedEntity
;
506
IEntityWrapper wrappedEntity2 = entry2.
WrappedEntity
;
666
relatedEnd.Add(targetEntry.
WrappedEntity
,
676
relatedEnd.Add(targetEntry.
WrappedEntity
,