2 writes to _context
System.Data.Entity (2)
System\Data\Objects\DataClasses\RelatedEnd.cs (2)
2330this._context = context; 2459this._context = null;
36 references to _context
System.Data.Entity (36)
System\Data\Objects\DataClasses\RelatedEnd.cs (36)
227return this._context; 330if (_context == null) 336EntityEntry stateEntry = _context.ObjectStateManager.FindEntityEntry(_wrappedOwner.Entity); 535ObjectQuery<TEntity> query = new ObjectQuery<TEntity>(_sourceQuery, _context, mergeOption); 611StateManagerTypeMetadata metaType = _context.ObjectStateManager.GetOrAddStateManagerTypeMetadata(member.DeclaringType); 730_context != null && 731_context.ContextOptions.LazyLoadingEnabled && 732!_context.InMaterialization && 745_context.ContextOptions.LazyLoadingEnabled = false; 752_context.ContextOptions.LazyLoadingEnabled = true; 1085if (_context != null && !UsingNoTracking) 1173else if ((_context == null || UsingNoTracking) && (targetRelatedEnd.ObjectContext != null && !targetRelatedEnd.UsingNoTracking)) 1377EntityEntry entry = _context.ObjectStateManager.GetEntityEntry(wrappedEntity.Entity); 1421if (null != _context && doFixup && 1448if (_context == null || !_context.ObjectStateManager.TransactionManager.IsLocalPublicAPI) 1454if (null != _context && (deleteEntity || 1457!ReferenceEquals(wrappedEntity.Entity, _context.ObjectStateManager.TransactionManager.EntityBeingReparented) && 1458!ReferenceEquals(_context.ObjectStateManager.EntityInvokingFKSetter, wrappedEntity.Entity)) 1575EntityEntry cacheEntry = _context.ObjectStateManager.FindEntityEntry(wrappedEntity.Entity); 1591_context.GetTypeUsage(otherRelatedEnd.WrappedOwner.IdentityType); 1751if (!_context.ObjectStateManager.TransactionManager.TrackProcessedEntities || 1752!(_context.ObjectStateManager.TransactionManager.IsAttachTracking || _context.ObjectStateManager.TransactionManager.IsAddTracking) || 1753_context.ObjectStateManager.TransactionManager.ProcessedEntities.Contains(wrappedEntity)) 1756EntityEntry cacheEntry = _context.ObjectStateManager.FindEntityEntry(wrappedEntity.Entity); 1785return this._context.ObjectStateManager.FindRelationship(_relationshipSet, 1904principalKey = _context.ObjectStateManager.CreateEntityKey(principalEntitySet, wrappedRelatedEntity.Entity); 2106Debug.Assert(_context != null, "Can't add to state manager if _context is null"); 2112_context.AddSingleObject(es, wrappedEntity, "entity"); 2116_context.AttachSingleObject(wrappedEntity, es, "entity"); 2151Debug.Assert(this._context != null && wrappedEntity.Context != null, "should be called only if both entities are attached"); 2152Debug.Assert(this._context == wrappedEntity.Context, "both entities should be attached to the same context"); 2319if (_context == context && (_usingNoTracking == (mergeOption == MergeOption.NoTracking))) 2335FindRelationshipSet(_context, entitySet, out relationshipType, out relationshipSet); 2450if (this._context != null &&