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