protected BaseEntityWrapper( TEntity entity, RelationshipManager relationshipManager, EntitySet entitySet, ObjectContext context, MergeOption mergeOption, Type identityType, bool overridesEquals) { if (relationshipManager == null) { throw new InvalidOperationException(Strings.RelationshipManager_UnexpectedNull); } this._identityType = identityType; this._relationshipManager = relationshipManager; if (overridesEquals) { this._flags = BaseEntityWrapper <> .WrapperFlags.OverridesEquals; } this.RelationshipManager.SetWrappedOwner((IEntityWrapper)this, (object)entity); if (entitySet == null) { return; } this.Context = context; this.MergeOption = mergeOption; this.RelationshipManager.AttachContextToRelatedEnds(context, entitySet, mergeOption); }
protected BaseEntityWrapper( TEntity entity, RelationshipManager relationshipManager, bool overridesEquals) { if (relationshipManager == null) { throw new InvalidOperationException(Strings.RelationshipManager_UnexpectedNull); } this._relationshipManager = relationshipManager; if (!overridesEquals) { return; } this._flags = BaseEntityWrapper <> .WrapperFlags.OverridesEquals; }