2 implementations of ObjectStateEntry
System.Data.Entity (2)
System\Data\Objects\Internal\BaseEntityWrapper.cs (1)
195
public EntityEntry
ObjectStateEntry
System\Data\Objects\Internal\NullEntityWrapper.cs (1)
61
public EntityEntry
ObjectStateEntry
4 writes to ObjectStateEntry
System.Data.Entity (4)
System\Data\Objects\EntityEntry.cs (4)
73
wrappedEntity.
ObjectStateEntry
= this;
2461
_wrappedEntity.
ObjectStateEntry
= null;
2838
_wrappedEntity.
ObjectStateEntry
= this;
2894
_wrappedEntity.
ObjectStateEntry
= null;
39 references to ObjectStateEntry
System.Data.Entity (39)
System\Data\Objects\DataClasses\EntityReference.cs (16)
310
if (WrappedOwner.
ObjectStateEntry
.State != EntityState.Added &&
431
(targetEntity.
ObjectStateEntry
== null || // setting to a detached principle
432
(EntityKey == null && targetEntity.
ObjectStateEntry
.State == EntityState.Deleted || // setting to a deleted principle
433
(CachedForeignKey == null && targetEntity.
ObjectStateEntry
.State == EntityState.Added))))) // setting to an added principle
523
dependentEntity.
ObjectStateEntry
,
538
SetCachedForeignKey(new EntityKey(principalEntitySet, value), dependentEntity.
ObjectStateEntry
);
544
SetCachedForeignKey(new EntityKey(principalEntitySet, values), dependentEntity.
ObjectStateEntry
);
546
if (WrappedOwner.
ObjectStateEntry
!= null)
548
stateManager.ForgetEntryWithConceptualNull(WrappedOwner.
ObjectStateEntry
, resetAllKeys: false);
589
dependentEntity.
ObjectStateEntry
,
597
SetCachedForeignKey(principalKey, dependentEntity.
ObjectStateEntry
);
598
if (WrappedOwner.
ObjectStateEntry
!= null)
600
stateManager.ForgetEntryWithConceptualNull(WrappedOwner.
ObjectStateEntry
, resetAllKeys: false);
633
EntityEntry entry = WrappedOwner.
ObjectStateEntry
;
681
WrappedOwner.
ObjectStateEntry
,
695
if (canSetModifiedProps && WrappedOwner.
ObjectStateEntry
.OriginalValues.GetValue(dependentOrdinal) != null)
System\Data\Objects\DataClasses\RelatedEnd.cs (9)
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)))))
870
if (!VerifyRIConstraintsWithRelatedEntry(constraint, ownerEntry.GetCurrentEntityValue, collection[0].
ObjectStateEntry
.EntityKey))
1698
EntityEntry dependentEntry = WrappedOwner.
ObjectStateEntry
;
1832
if (wrappedRelatedEntity.
ObjectStateEntry
!= null && wrappedRelatedEntity.
ObjectStateEntry
.State == EntityState.Added)
1868
EntityEntry dependent = wrappedRelatedEntity.
ObjectStateEntry
;
System\Data\Objects\EntityEntry.cs (12)
2189
Debug.Assert(relatedWrapper.
ObjectStateEntry
!= null, "Expected related entity to be tracked in snapshot code.");
2190
if (relatedWrapper.
ObjectStateEntry
.State == EntityState.Deleted)
2196
(relatedWrapper.
ObjectStateEntry
.State & (EntityState.Modified | EntityState.Unchanged)) != 0)
2202
principalEntry = relatedWrapper.
ObjectStateEntry
;
2208
dependentEntry = relatedWrapper.
ObjectStateEntry
;
3466
EntityEntry existingPrincipalEntry = existingPrincipal.
ObjectStateEntry
;
3531
relatedEnd.ReferenceValue.
ObjectStateEntry
== null ||
3532
relatedEnd.ReferenceValue.
ObjectStateEntry
.State != EntityState.Added);
3656
if (relatedEnd.CachedValue.Entity == null || relatedEnd.CachedValue.
ObjectStateEntry
== null)
3662
principalKey = relatedEnd.EntityKey ?? relatedEnd.CachedValue.
ObjectStateEntry
.EntityKey;
3707
EntityEntry principalEntry = existingPrincipal.
ObjectStateEntry
;
3758
EntityEntry dependentEntry = dependent.
ObjectStateEntry
;
System\Data\Objects\ObjectStateManager.cs (2)
3290
if (entityTo.
ObjectStateEntry
!= null)
3292
entityKey = entityTo.
ObjectStateEntry
.EntityKey;