108 references to Unchanged
System.Data.Entity (107)
System\Data\Common\EntityUtil.cs (2)
843
case EntityState.
Unchanged
:
858
case EntityState.
Unchanged
:
System\Data\Common\Internal\Materialization\Shaper.cs (1)
778
if (EntityState.
Unchanged
== existingEntry.State)
System\Data\Mapping\Update\Internal\ExtractedStateEntry.cs (1)
41
case EntityState.
Unchanged
:
System\Data\Mapping\Update\Internal\FunctionMappingTranslator.cs (3)
110
if (stateEntries.All(e => e.State == EntityState.
Unchanged
))
164
case EntityState.
Unchanged
:
212
case EntityState.
Unchanged
:
System\Data\Mapping\Update\Internal\FunctionUpdateCommand.cs (1)
344
case EntityState.
Unchanged
:
System\Data\Mapping\Update\Internal\UpdateCompiler.cs (1)
112
if (stateEntries.All(it => (it.State == EntityState.
Unchanged
)))
System\Data\Mapping\Update\Internal\UpdateTranslator.cs (4)
598
if (EntityState.
Unchanged
!= stateEntry.State)
937
if (0 != ((EntityState.Added | EntityState.Modified | EntityState.
Unchanged
) & stateEntry.State))
943
if (0 != ((EntityState.Modified | EntityState.Deleted | EntityState.
Unchanged
) & stateEntry.State))
1014
endEntry.State == EntityState.
Unchanged
) // if the entity is being modified, it's already included anyways
System\Data\Objects\DataClasses\EntityReference.cs (2)
279
relationshipState = EntityState.
Unchanged
;
659
bool canSetModifiedProps = entry != null && (entry.State == EntityState.Modified || entry.State == EntityState.
Unchanged
);
System\Data\Objects\DataClasses\EntityReference_TResultType.cs (1)
366
manager.AddNewRelation(wrapper, doAttach ? EntityState.
Unchanged
: EntityState.Added);
System\Data\Objects\DataClasses\RelatedEnd.cs (6)
372
entityState == EntityState.
Unchanged
||
740
(_wrappedOwner.ObjectStateEntry.State == EntityState.
Unchanged
||
911
stateEntry.State != EntityState.
Unchanged
)
956
if (stateEntry.State != EntityState.
Unchanged
&&
1703
if (dependentEntry.State == EntityState.
Unchanged
|| dependentEntry.State == EntityState.Modified)
2165
(addRelationshipAsUnchanged || doAttach) ? EntityState.
Unchanged
: EntityState.Added);
System\Data\Objects\EntityEntry.cs (41)
102
: base(cache, entitySet, EntityState.
Unchanged
)
214
Debug.Assert(State == EntityState.
Unchanged
|| State == EntityState.Modified, "ValidateAndGetOrdinalForProperty should have thrown.");
216
if (EntityState.
Unchanged
== State)
219
_cache.ChangeState(this, EntityState.
Unchanged
, State);
281
if (State == EntityState.
Unchanged
)
307
ChangeObjectState(EntityState.
Unchanged
);
431
Debug.Assert(!this.IsKeyEntry || State == EntityState.
Unchanged
, "Key ObjectStateEntries must always be unchanged.");
462
State = EntityState.
Unchanged
;
475
_cache.ChangeState(this, EntityState.Modified, EntityState.
Unchanged
);
479
State = EntityState.
Unchanged
;
487
case EntityState.
Unchanged
:
502
if (EntityState.
Unchanged
== State)
505
_cache.ChangeState(this, EntityState.
Unchanged
, State);
940
State = (_modifiedFields == null) ? EntityState.
Unchanged
: EntityState.Modified;
1238
if (initialState == EntityState.
Unchanged
)
1280
_cache.SaveOriginalValues = (State == EntityState.
Unchanged
|| State == EntityState.Modified) &&
1644
EntityState.
Unchanged
== State,
2112
(principalEntry.State == EntityState.Modified || principalEntry.State == EntityState.
Unchanged
))
2195
(State & (EntityState.Modified | EntityState.
Unchanged
)) != 0 &&
2196
(relatedWrapper.ObjectStateEntry.State & (EntityState.Modified | EntityState.
Unchanged
)) != 0)
2513
case EntityState.
Unchanged
:
2521
Debug.Assert(State == EntityState.
Unchanged
, "Unexpected state");
2522
Debug.Assert(EntityState.
Unchanged
== State, "Expected ObjectStateEntry state is Unchanged; make sure FixupRelationship did not corrupt cache entry state");
2523
_cache.ChangeState(this, EntityState.
Unchanged
, EntityState.Deleted);
2794
if (otherEnd.State == EntityState.
Unchanged
|| otherEnd.State == EntityState.Modified)
2886
if (State != EntityState.
Unchanged
)
2888
_cache.ChangeState(this, this.State, EntityState.
Unchanged
);
2889
State = EntityState.
Unchanged
;
3040
if (relationshipEntry.State == EntityState.
Unchanged
)
3042
this.ObjectStateManager.ChangeState(relationshipEntry, EntityState.
Unchanged
, EntityState.Added);
3068
if (requestedState == EntityState.
Unchanged
)
3084
case EntityState.
Unchanged
:
3111
case EntityState.
Unchanged
:
3123
case EntityState.
Unchanged
:
3156
case EntityState.
Unchanged
:
3193
case EntityState.
Unchanged
:
3200
this.ObjectStateManager.ChangeState(this, EntityState.Deleted, EntityState.
Unchanged
);
3201
this.State = EntityState.
Unchanged
;
3247
if (oldState == EntityState.
Unchanged
&& this.State == EntityState.Modified)
3347
this.State != EntityState.
Unchanged
)
3374
this.State != EntityState.
Unchanged
&&
System\Data\Objects\ObjectContext.cs (2)
577
EntityState exptectedState = doAttach ? EntityState.
Unchanged
: EntityState.Added;
962
ose.State != EntityState.
Unchanged
&&
System\Data\Objects\ObjectStateEntryDbDataRecord.cs (2)
35
case EntityState.
Unchanged
:
53
case EntityState.
Unchanged
:
System\Data\Objects\ObjectStateEntryDbUpdatableDataRecord.cs (2)
31
case EntityState.
Unchanged
:
46
case EntityState.
Unchanged
:
System\Data\Objects\ObjectStateEntryOriginalDbUpdatableDataRecord.cs (2)
33
case EntityState.
Unchanged
:
118
if (oldState == EntityState.
Unchanged
&& entry.State == EntityState.Modified)
System\Data\Objects\ObjectStateManager.cs (22)
429
EntityEntry newEntry = new EntityEntry(wrappedObject, entityKey, entitySet, this, typeMetadata, isAdded ? EntityState.Added : EntityState.
Unchanged
);
1171
newEntryState = EntityState.
Unchanged
;
1218
Debug.Assert(relationshipEntry.State == EntityState.Added || relationshipEntry.State == EntityState.
Unchanged
, "Unexpected relationshipEntry state");
1236
case EntityState.
Unchanged
:
1432
EntityEntry newEntry = new EntityEntry(wrappedObject, entityKey, entitySet, this, typeMetadata, EntityState.
Unchanged
);
1513
EntityState.
Unchanged
== desiredState || // result entry should be that state
1528
if (EntityState.
Unchanged
== desiredState)
1808
if ((EntityState.
Unchanged
& state) != 0)
1860
if (((EntityState.
Unchanged
& state) != 0) && (null != _unchangedRelationshipStore))
1888
if (((EntityState.
Unchanged
& state) != 0) && (null != _unchangedEntityStore))
2037
Debug.Assert(existingEntry.State == EntityState.
Unchanged
, "entity stub must be in unchanged state");
2049
AddEntityEntryToDictionary(entry, EntityState.
Unchanged
);
2366
case EntityState.
Unchanged
:
2762
case EntityState.
Unchanged
:
2803
case EntityState.
Unchanged
:
2874
case EntityState.
Unchanged
:
2896
case EntityState.
Unchanged
:
2918
case EntityState.
Unchanged
:
2944
case EntityState.
Unchanged
:
3142
if (entry.State == EntityState.
Unchanged
|| entry.State == EntityState.Modified)
3176
if (pair.Key.IsForeignKey && (entry.State == EntityState.
Unchanged
|| entry.State == EntityState.Modified))
3258
(relatedEntry.State == EntityState.
Unchanged
||
System\Data\Objects\RelationshipEntry.cs (14)
40
EntityState.
Unchanged
== state ||
80
_cache.ChangeState(this, EntityState.Added, EntityState.
Unchanged
);
81
State = EntityState.
Unchanged
;
86
case EntityState.
Unchanged
:
319
State = EntityState.
Unchanged
;
583
case EntityState.
Unchanged
:
584
_cache.ChangeState(this, EntityState.
Unchanged
, EntityState.Deleted);
621
case EntityState.
Unchanged
:
638
case EntityState.
Unchanged
:
642
this.ObjectStateManager.ChangeState(this, EntityState.
Unchanged
, EntityState.Added);
645
case EntityState.
Unchanged
:
675
case EntityState.
Unchanged
:
682
this.ObjectStateManager.ChangeState(this, EntityState.Deleted, EntityState.
Unchanged
);
683
this.State = EntityState.
Unchanged
;
System.Data.Services (1)
System\Data\Services\Providers\ObjectContextServiceProvider.cs (1)
601
foreach (ObjectStateEntry entry in this.ObjectContext.ObjectStateManager.GetObjectStateEntries(EntityState.Added | EntityState.Deleted | EntityState.Modified | EntityState.
Unchanged
))