84 references to WrappedOwner
System.Data.Entity (84)
System\Data\Objects\DataClasses\EntityCollection.cs (8)
191
if (
WrappedOwner
.Entity != null)
394
IEntityWrapper identityWrapper = EntityWrapperFactory.WrapEntityUsingContext(wrappedEntity.Entity,
WrappedOwner
.Context);
555
return this.
WrappedOwner
.CollectionRemove(this, (TEntity)wrappedEntity.Entity);
632
if (
WrappedOwner
.Entity != null)
737
object value = this.
WrappedOwner
.GetNavigationPropertyValue(this);
744
this.TargetAccessor.PropertyName, this.
WrappedOwner
.Entity.GetType().FullName));
774
if (!(
WrappedOwner
.Entity is IEntityWithRelationships))
834
this.
WrappedOwner
.CollectionAdd(this, wrappedEntity.Entity);
System\Data\Objects\DataClasses\EntityReference.cs (27)
92
Debug.Assert(this.
WrappedOwner
.Entity != null, "Unexpected null Owner on EntityReference attached to a context");
130
EntityKey ownerKey =
WrappedOwner
.EntityKey;
175
Debug.Assert(this.
WrappedOwner
.Entity != null, "Unexpected null Owner on EntityReference attached to a context");
241
ValidateStateForAdd(this.
WrappedOwner
);
249
manager.TransactionManager.EntityBeingReparented =
WrappedOwner
.Entity;
266
UpdateForeignKeyValues(
WrappedOwner
, value);
303
WrappedOwner
.Entity != null &&
304
WrappedOwner
.Context != null &&
310
if (
WrappedOwner
.ObjectStateEntry.State != EntityState.Added &&
398
EntityKey ownerKey =
WrappedOwner
.EntityKey;
415
otherEnd.ValidateOwnerWithRIConstraints(
WrappedOwner
, ownerKey, checkBothEnds: false);
469
bool isUnchangedDependent = (object)
WrappedOwner
.EntityKey != null &&
470
!
WrappedOwner
.EntityKey.IsTemporary &&
546
if (
WrappedOwner
.ObjectStateEntry != null)
548
stateManager.ForgetEntryWithConceptualNull(
WrappedOwner
.ObjectStateEntry, resetAllKeys: false);
598
if (
WrappedOwner
.ObjectStateEntry != null)
600
stateManager.ForgetEntryWithConceptualNull(
WrappedOwner
.ObjectStateEntry, resetAllKeys: false);
612
WrappedOwner
.Entity :
620
return !TargetAccessor.HasProperty ||
WrappedOwner
.GetNavigationPropertyValue(this) == null;
633
EntityEntry entry =
WrappedOwner
.ObjectStateEntry;
653
else if (!ReferenceEquals(stateManager.EntityInvokingFKSetter,
WrappedOwner
.Entity) && !transManager.IsForeignKeyUpdate)
661
StateManagerTypeMetadata dependentTypeMetadata = stateManager.GetOrAddStateManagerTypeMetadata(
WrappedOwner
.IdentityType, dependentEntitySet);
678
if (member.GetValue(
WrappedOwner
.Entity) != null)
680
WrappedOwner
.SetCurrentValue(
681
WrappedOwner
.ObjectStateEntry,
684
WrappedOwner
.Entity,
695
if (canSetModifiedProps &&
WrappedOwner
.ObjectStateEntry.OriginalValues.GetValue(dependentOrdinal) != null)
System\Data\Objects\DataClasses\EntityReference_TResultType.cs (14)
194
EntityKey sourceKey =
WrappedOwner
.EntityKey;
266
IEntityWrapper identityWrapper = EntityWrapperFactory.WrapEntityUsingContext(_wrappedCachedValue.Entity,
WrappedOwner
.Context);
362
EntityKey ownerKey =
WrappedOwner
.EntityKey;
434
EntityKey ownerKey =
WrappedOwner
.EntityKey;
475
if (
WrappedOwner
.Entity != null &&
WrappedOwner
.Context != null && !UsingNoTracking)
477
EntityEntry ownerEntry =
WrappedOwner
.Context.ObjectStateManager.GetEntityEntry(
WrappedOwner
.Entity);
484
if (this.
WrappedOwner
.Entity != null)
588
this.
WrappedOwner
.RemoveNavigationPropertyValue(this, (TEntity)wrappedEntity.Entity);
713
object value = this.
WrappedOwner
.GetNavigationPropertyValue(this);
722
object value =
WrappedOwner
.GetNavigationPropertyValue(this);
748
if (!(
WrappedOwner
.Entity is IEntityWithRelationships))
804
this.
WrappedOwner
.SetNavigationPropertyValue(this, wrappedEntity.Entity);
System\Data\Objects\DataClasses\RelatedEnd.cs (25)
882
EntityEntry targetEntry = stateManager.FindEntityEntry(((EntityReference)targetRelatedEnd).
WrappedOwner
.Entity);
1176
targetRelatedEnd.ValidateStateForAdd(targetRelatedEnd.
WrappedOwner
);
1202
if (targetRelatedEnd.CheckIfNavigationPropertyContainsEntity(
WrappedOwner
))
1236
this.
WrappedOwner
.EntityKey != null &&
1237
!this.
WrappedOwner
.EntityKey.IsTemporary && IsDependentEndOfReferentialConstraint(false))
1272
TransactionManager transManager = attachedRelatedEnd.
WrappedOwner
.Context.ObjectStateManager.TransactionManager;
1281
if (attachedRelatedEnd.
WrappedOwner
.Context.ObjectStateManager.TransactionManager.TrackProcessedEntities)
1284
if (!attachedRelatedEnd.
WrappedOwner
.Context.ObjectStateManager.TransactionManager.WrappedEntities.ContainsKey(entityToAdd.Entity))
1286
attachedRelatedEnd.
WrappedOwner
.Context.ObjectStateManager.TransactionManager.WrappedEntities.Add(entityToAdd.Entity, entityToAdd);
1288
attachedRelatedEnd.
WrappedOwner
.Context.ObjectStateManager.TransactionManager.ProcessedEntities.Add(attachedRelatedEnd.
WrappedOwner
);
1310
attachedRelatedEnd.
WrappedOwner
.Context.ObjectStateManager.DegradePromotedRelationships();
1327
attachedRelatedEnd.
WrappedOwner
.Context.ObjectStateManager.TransactionManager.EndAddTracking();
1372
if (wrappedEntity.RequiresRelationshipChangeTracking ||
WrappedOwner
.RequiresRelationshipChangeTracking)
1388
if (!otherRelatedEnd.ContainsEntity(this.
WrappedOwner
))
1392
otherRelatedEnd.AddToLocalCache(this.
WrappedOwner
, applyConstraints: false);
1407
relatedEnd.RemoveFromNavigationProperty(this.
WrappedOwner
);
1584
if (wrappedEntity.RequiresRelationshipChangeTracking ||
WrappedOwner
.RequiresRelationshipChangeTracking)
1591
_context.GetTypeUsage(otherRelatedEnd.
WrappedOwner
.IdentityType);
1678
if (wrappedEntity.RequiresRelationshipChangeTracking ||
WrappedOwner
.RequiresRelationshipChangeTracking)
1698
EntityEntry dependentEntry =
WrappedOwner
.ObjectStateEntry;
2603
RelationshipManager.TryGetRelationshipType(
WrappedOwner
,
WrappedOwner
.IdentityType, relationshipName, out associationType) ||
2604
EntityProxyFactory.TryGetAssociationTypeFromProxyInfo(
WrappedOwner
, relationshipName, targetRoleName, out associationType))
2623
throw RelationshipManager.UnableToGetMetadata(
WrappedOwner
, relationshipName);
System\Data\Objects\DataClasses\RelationshipManager.cs (2)
529
if (entityReference.
WrappedOwner
.Entity != null)
583
if (entityCollection.
WrappedOwner
.Entity != null)
System\Data\Objects\EntityEntry.cs (4)
2373
if (!relationships.TryGetValue(relatedEnd.
WrappedOwner
, out alreadyDetectedRelationshipsFrom))
2376
relationships.Add(relatedEnd.
WrappedOwner
, alreadyDetectedRelationshipsFrom);
3622
(Object.ReferenceEquals(refToDependent.ReferenceValue.Entity, refToPrincipal.
WrappedOwner
.Entity) ||
3623
refToDependent.CheckIfNavigationPropertyContainsEntity(refToPrincipal.
WrappedOwner
)))
System\Data\Objects\Internal\PocoPropertyAccessorStrategy.cs (2)
106
ObjectTypeMapping mapping = System.Data.Common.Internal.Materialization.Util.GetObjectMapping(declaringEntityType, relatedEnd.
WrappedOwner
.Context.MetadataWorkspace);
111
return relatedEnd.
WrappedOwner
.IdentityType;
System\Data\Objects\ObjectStateManager.cs (2)
3418
Debug.Assert(wrappedOwner == relatedEnd.
WrappedOwner
, "entry.WrappedEntity is not the same as relatedEnd.WrappedOwner?");
3420
relatedEnd.ValidateStateForAdd(relatedEnd.
WrappedOwner
);