internal void SetNextRelationshipEnd(EntityKey entityKey, RelationshipEntry nextEnd)
 {
     Debug.Assert(null != (object)entityKey, "null EntityKey");
     Debug.Assert(entityKey.Equals(Key0) || entityKey.Equals(Key1), "EntityKey mismatch");
     if (entityKey.Equals(Key0))
     {
         NextKey0 = nextEnd;
     }
     else
     {
         NextKey1 = nextEnd;
     }
 }
 internal ObjectStateEntryDbUpdatableDataRecord(RelationshipEntry cacheEntry)
     : base(cacheEntry)
 {
     EntityUtil.CheckArgumentNull(cacheEntry, "cacheEntry");
     switch (cacheEntry.State)
     {
         case EntityState.Unchanged:
         case EntityState.Modified:
         case EntityState.Added:
             break;
         default:
             Debug.Assert(false, "A CurrentValueRecord cannot be created for an entity object that is in a deleted or detached state.");
             break;
     }
 }
Exemple #3
0
        internal ObjectStateEntryDbUpdatableDataRecord(RelationshipEntry cacheEntry)
            : base(cacheEntry)
        {
            EntityUtil.CheckArgumentNull(cacheEntry, "cacheEntry");
            switch (cacheEntry.State)
            {
            case EntityState.Unchanged:
            case EntityState.Modified:
            case EntityState.Added:
                break;

            default:
                Debug.Assert(false, "A CurrentValueRecord cannot be created for an entity object that is in a deleted or detached state.");
                break;
            }
        }
 internal ObjectStateEntryDbDataRecord(RelationshipEntry cacheEntry)
 {
     EntityUtil.CheckArgumentNull(cacheEntry, "cacheEntry");
     Debug.Assert(!cacheEntry.IsKeyEntry, "Cannot create an ObjectStateEntryDbDataRecord for a key entry");
     switch (cacheEntry.State)
     {
         case EntityState.Unchanged:
         case EntityState.Modified:
         case EntityState.Deleted:
             _cacheEntry = cacheEntry;
             break;
         default:
             Debug.Assert(false, "A DbDataRecord cannot be created for an entity object that is in an added or detached state.");
             break;
     }
 }
 internal ObjectStateEntryDbUpdatableDataRecord(RelationshipEntry cacheEntry)
     : base(cacheEntry)
 {
     //Contract.Requires(cacheEntry != null);
     switch (cacheEntry.State)
     {
         case EntityState.Unchanged:
         case EntityState.Modified:
         case EntityState.Added:
             break;
         default:
             Debug.Assert(
                 false, "A CurrentValueRecord cannot be created for an entity object that is in a deleted or detached state.");
             break;
     }
 }
Exemple #6
0
        internal ObjectStateEntryDbDataRecord(RelationshipEntry cacheEntry)
        {
            EntityUtil.CheckArgumentNull(cacheEntry, "cacheEntry");
            Debug.Assert(!cacheEntry.IsKeyEntry, "Cannot create an ObjectStateEntryDbDataRecord for a key entry");
            switch (cacheEntry.State)
            {
            case EntityState.Unchanged:
            case EntityState.Modified:
            case EntityState.Deleted:
                _cacheEntry = cacheEntry;
                break;

            default:
                Debug.Assert(false, "A DbDataRecord cannot be created for an entity object that is in an added or detached state.");
                break;
            }
        }
 internal void SetNextRelationshipEnd(EntityKey entityKey, RelationshipEntry nextEnd)
 {
     Debug.Assert(null != (object)entityKey, "null EntityKey");
     Debug.Assert(entityKey.Equals(Key0) || entityKey.Equals(Key1), "EntityKey mismatch");
     if (entityKey.Equals(Key0))
     {
         NextKey0 = nextEnd;
     }
     else
     {
         NextKey1 = nextEnd;
     }
 }