1 write to Context
System.Data.Entity (1)
System\Data\Common\Internal\Materialization\Shaper.cs (1)
36
this.
Context
= context;
31 references to Context
System.Data.Entity (31)
System\Data\Common\Internal\Materialization\Shaper.cs (28)
152
EntityEntry existingEntry = this.
Context
.ObjectStateManager.FindEntityEntry(entityKey);
164
Context
.ObjectStateManager.AddEntry(wrappedEntity, entityKey, entitySet, "HandleEntity", false);
168
Context
.ObjectStateManager.PromoteKeyEntry(existingEntry, wrappedEntity, (IExtendedDataRecord)null, false, /*setIsLoaded*/ true, /*keyEntryInitialized*/ false, "HandleEntity");
200
EntityEntry existingEntry = this.
Context
.ObjectStateManager.FindEntityEntry(entityKey);
222
Context
.ObjectStateManager.AddEntry(result, entityKey, entitySet, "HandleEntity", false);
226
Context
.ObjectStateManager.PromoteKeyEntry(existingEntry, result, (IExtendedDataRecord)null, false, /*setIsLoaded*/ true, /*keyEntryInitialized*/ false, "HandleEntity");
298
EntityContainer entityContainer = this.
Context
.MetadataWorkspace.GetEntityContainer(
306
ObjectStateManager manager =
Context
.ObjectStateManager;
309
if (!ObjectStateManager.TryUpdateExistingRelationships(this.
Context
, this.MergeOption, associationSet, sourceMember, sourceKey, wrappedEntity, targetMember, targetKey, /*setIsLoaded*/ true, out newEntryState))
328
needNewRelationship = !ObjectStateManager.TryUpdateExistingRelationships(this.
Context
,
678
if (!this.
Context
.Perspective.TryGetType(wrappedSource.IdentityType, out entityTypeUsage) ||
698
Debug.Assert(this.
Context
!= null);
702
EntityContainer entityContainer = this.
Context
.MetadataWorkspace.GetEntityContainer(sourceKey.EntityContainerName,
711
ObjectStateManager.RemoveRelationships(
Context
, MergeOption, associationSet, sourceKey, sourceMember);
732
int count = ObjectStateManager.UpdateRelationships(this.
Context
, this.MergeOption, (AssociationSet)relatedEnd.RelationshipSet, sourceMember, sourceKey, wrappedSource, targetMember, (List<T_TargetEntity>)spannedEntities, true);
771
Context
.ObjectStateManager.ForgetEntryWithConceptualNull(existingEntry, resetAllKeys: true);
773
Context
.ObjectStateManager.FixupReferencesByForeignKeys(existingEntry, replaceAddedRefs: true);
782
Context
.ObjectStateManager.ForgetEntryWithConceptualNull(existingEntry, resetAllKeys: true);
784
Context
.ObjectStateManager.FixupReferencesByForeignKeys(existingEntry, replaceAddedRefs: true);
788
if (
Context
.ContextOptions.UseLegacyPreserveChangesBehavior)
977
Context
.OnObjectMaterialized(wrappedEntity.Entity);
985
if (
Context
.OnMaterializedHasHandlers)
1174
if (this.
Context
!= null)
1176
this.
Context
.ReleaseConnection();
1223
if (
Context
!= null)
1225
Context
.InMaterialization = true;
1235
if (
Context
!= null)
1237
Context
.InMaterialization = false;
System\Data\Objects\ObjectResult_TResultType.cs (3)
108
if (_shaper.
Context
!= null && _readerOwned)
110
_shaper.
Context
.ReleaseConnection();
133
_cachedBindingList = ObjectViewFactory.CreateViewForQuery<T>(this._resultItemType, this, this._shaper.
Context
, forceReadOnly, this._singleEntitySet);