コード例 #1
0
 internal RelationshipEntry(
     ObjectStateManager cache,
     EntityState state,
     RelationshipWrapper relationshipWrapper)
     : base(cache, (EntitySet)null, state)
 {
     this._entitySet           = (EntitySetBase)relationshipWrapper.AssociationSet;
     this._relationshipWrapper = relationshipWrapper;
 }
コード例 #2
0
ファイル: RelationshipEntry.cs プロジェクト: dotnet/ef6tools
        internal RelationshipEntry(ObjectStateManager cache, EntityState state, RelationshipWrapper relationshipWrapper)
            : base(cache, null, state)
        {
            DebugCheck.NotNull(relationshipWrapper);
            Debug.Assert(
                EntityState.Added == state ||
                EntityState.Unchanged == state ||
                EntityState.Deleted == state,
                "invalid EntityState");

            base._entitySet      = relationshipWrapper.AssociationSet;
            _relationshipWrapper = relationshipWrapper;
        }
コード例 #3
0
 internal void ChangeRelatedEnd(EntityKey oldKey, EntityKey newKey)
 {
     if (oldKey.Equals(this.Key0))
     {
         if (oldKey.Equals(this.Key1))
         {
             this.RelationshipWrapper = new RelationshipWrapper(this.RelationshipWrapper.AssociationSet, newKey);
         }
         else
         {
             this.RelationshipWrapper = new RelationshipWrapper(this.RelationshipWrapper, 0, newKey);
         }
     }
     else
     {
         this.RelationshipWrapper = new RelationshipWrapper(this.RelationshipWrapper, 1, newKey);
     }
 }
コード例 #4
0
ファイル: RelationshipEntry.cs プロジェクト: dotnet/ef6tools
 // <summary>
 // Update one of the ends of the relationship
 // </summary>
 internal void ChangeRelatedEnd(EntityKey oldKey, EntityKey newKey)
 {
     if (oldKey.Equals(Key0))
     {
         if (oldKey.Equals(Key1))
         {
             // self-reference
             RelationshipWrapper = new RelationshipWrapper(RelationshipWrapper.AssociationSet, newKey);
         }
         else
         {
             RelationshipWrapper = new RelationshipWrapper(RelationshipWrapper, 0, newKey);
         }
     }
     else
     {
         RelationshipWrapper = new RelationshipWrapper(RelationshipWrapper, 1, newKey);
     }
 }
コード例 #5
0
 internal override void Reset()
 {
     this._relationshipWrapper = (RelationshipWrapper)null;
     base.Reset();
 }
コード例 #6
0
ファイル: RelationshipEntry.cs プロジェクト: dotnet/ef6tools
        internal override void Reset()
        {
            _relationshipWrapper = null;

            base.Reset();
        }