3 writes to _wrappedOwner
System.Data.Entity (3)
System\Data\Objects\DataClasses\RelatedEnd.cs (3)
42
_wrappedOwner
= EntityWrapperFactory.NullWrapper;
2515
_wrappedOwner
= wrappedOwner != null ? wrappedOwner : EntityWrapperFactory.NullWrapper;
2538
_wrappedOwner
= EntityWrapperFactory.WrapEntityUsingContext(_owner, ObjectContext);
53 references to _wrappedOwner
System.Data.Entity (53)
System\Data\Objects\DataClasses\RelatedEnd.cs (53)
219
return this.
_wrappedOwner
;
336
EntityEntry stateEntry = _context.ObjectStateManager.FindEntityEntry(
_wrappedOwner
.Entity);
384
EntityKey key =
_wrappedOwner
.EntityKey;
553
value =
_wrappedOwner
.EntityKey.EntityKeyValues.Single(ekv => ekv.Key == parameterMember.Name).Value;
613
return metaMember.GetValue(
_wrappedOwner
.Entity);
674
EntityEntry entry = ObjectContext.ObjectStateManager.FindEntityEntry(
_wrappedOwner
.Entity);
728
if (
_wrappedOwner
!= null &&
_wrappedOwner
!= EntityWrapperFactory.NullWrapper &&
737
Debug.Assert(
_wrappedOwner
!= null, "Wrapper owner should never be null");
739
(
_wrappedOwner
.ObjectStateEntry != null &&
740
(
_wrappedOwner
.ObjectStateEntry.State == EntityState.Unchanged ||
741
_wrappedOwner
.ObjectStateEntry.State == EntityState.Modified ||
742
(
_wrappedOwner
.ObjectStateEntry.State == EntityState.Added && IsForeignKey && IsDependentEndOfReferentialConstraint(false)))))
797
EntityKey sourceKey =
_wrappedOwner
.EntityKey;
800
ObjectStateManager.UpdateRelationships(this.ObjectContext, mergeOption, (AssociationSet)RelationshipSet, (AssociationEndMember)FromEndProperty, sourceKey,
_wrappedOwner
, (AssociationEndMember)ToEndMember, collection, setIsLoaded);
865
EntityEntry ownerEntry = stateManager.FindEntityEntry(
_wrappedOwner
.Entity);
909
EntityEntry stateEntry = this.ObjectContext.ObjectStateManager.GetEntityEntry(
_wrappedOwner
.Entity);
1004
if (
_wrappedOwner
.Entity != null)
1051
if (
_wrappedOwner
.Entity != null)
1087
ValidateStateForAdd(
_wrappedOwner
);
1179
targetRelatedEnd.VerifyEntityForAdd(
_wrappedOwner
, relationshipAlreadyExists);
1207
targetRelatedEnd.AddToLocalCache(
_wrappedOwner
, /*applyConstraints*/ false);
1211
targetRelatedEnd.AddToCache(
_wrappedOwner
, /*applyConstraints*/ false);
1253
targetRelatedEnd.AddToNavigationProperty(this.
_wrappedOwner
);
1262
entityToAdd =
_wrappedOwner
;
1299
targetRelatedEnd.AddToNavigationProperty(this.
_wrappedOwner
);
1342
((EntityReference)this).UpdateForeignKeyValues(
_wrappedOwner
, wrappedTarget, changedFKs: null, forceChange: forceForeignKeyChanges);
1347
((EntityReference)targetRelatedEnd).UpdateForeignKeyValues(wrappedTarget,
_wrappedOwner
, changedFKs: null, forceChange: forceForeignKeyChanges);
1353
targetRelatedEnd.OnAssociationChanged(CollectionChangeAction.Add,
_wrappedOwner
.Entity);
1427
relatedEnd.Remove(
_wrappedOwner
, doFixup, deleteEntity, deleteOwner, applyReferentialConstraints, preserveForeignKey);
1440
MarkRelationshipAsDeletedInObjectStateManager(wrappedEntity,
_wrappedOwner
, _relationshipSet, _navigation);
1465
RemoveEntityFromRelatedEnds(wrappedEntity,
_wrappedOwner
, _navigation.Reverse);
1600
otherRelatedEnd.AddToNavigationProperty(this.
_wrappedOwner
);
1612
else if (!otherEndAsRef.CheckIfNavigationPropertyContainsEntity(this.
_wrappedOwner
))
1622
otherRelatedEnd.AddToNavigationProperty(this.
_wrappedOwner
);
1765
RemoveRelationshipFromObjectStateManager(wrappedEntity,
_wrappedOwner
, _relationshipSet, _navigation);
1774
RemoveRelationshipFromObjectStateManager(wrappedEntity,
_wrappedOwner
, _relationshipSet, _navigation);
1784
EntityKey ownerKey =
_wrappedOwner
.EntityKey;
2022
DetachRelationshipFromObjectStateManager(wrappedEntity,
_wrappedOwner
, _relationshipSet, _navigation);
2025
relatedEnd.RemoveFromCache(
_wrappedOwner
, /* resetIsLoaded */ true, /*preserveForeignKey*/ false);
2026
relatedEnd.OnAssociationChanged(CollectionChangeAction.Remove,
_wrappedOwner
.Entity);
2154
EntityKey ownerKey =
_wrappedOwner
.EntityKey;
2217
relatedEnd.Remove(
_wrappedOwner
, /*fixup*/false, /*deleteEntity*/false, /*deleteOwner*/false, /*applyReferentialConstraints*/false, preserveForeignKey);
2218
relatedEnd.RemoveFromNavigationProperty(
_wrappedOwner
);
2297
if (!
_wrappedOwner
.InitializingProxyRelatedEnds)
2299
EntityKey ownerKey =
_wrappedOwner
.EntityKey;
2317
_wrappedOwner
.RelationshipManager.NodeVisited = false;
2497
if (
_wrappedOwner
.Entity == null)
2549
if (this.navigationPropertyCache == null &&
_wrappedOwner
.Context != null && this.TargetAccessor.HasProperty)
2553
EntityType entityType =
_wrappedOwner
.Context.MetadataWorkspace.GetItem<EntityType>(
_wrappedOwner
.IdentityType.FullName, DataSpace.OSpace);
2572
if (
_wrappedOwner
.Entity != null)
2592
Debug.Assert(
_wrappedOwner
.Entity != null, "Must be connected to lookup metadata");