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