internal ObjectStateEntryDbUpdatableDataRecord(RelationshipEntry cacheEntry)
     : base((ObjectStateEntry)cacheEntry)
 {
     switch (cacheEntry.State)
     {
     }
 }
Beispiel #2
0
 private object GetCurrentRelationValue(int ordinal, bool throwException)
 {
     RelationshipEntry.ValidateRelationshipRange(ordinal);
     this.ValidateState();
     if (this.State == EntityState.Deleted && throwException)
     {
         throw new InvalidOperationException(Strings.ObjectStateEntry_CurrentValuesDoesNotExist);
     }
     return((object)this._relationshipWrapper.GetEntityKey(ordinal));
 }
Beispiel #3
0
 internal void SetNextRelationshipEnd(EntityKey entityKey, RelationshipEntry nextEnd)
 {
     if (entityKey.Equals(this.Key0))
     {
         this.NextKey0 = nextEnd;
     }
     else
     {
         this.NextKey1 = nextEnd;
     }
 }
Beispiel #4
0
 internal ObjectStateEntryDbDataRecord(RelationshipEntry cacheEntry)
 {
     switch (cacheEntry.State)
     {
     case EntityState.Unchanged:
     case EntityState.Deleted:
     case EntityState.Modified:
         this._cacheEntry = (ObjectStateEntry)cacheEntry;
         break;
     }
 }
Beispiel #5
0
 internal void SetNextRelationshipEnd(EntityKey entityKey, RelationshipEntry nextEnd)
 {
     DebugCheck.NotNull((object)entityKey);
     Debug.Assert(entityKey.Equals(Key0) || entityKey.Equals(Key1), "EntityKey mismatch");
     if (entityKey.Equals(Key0))
     {
         NextKey0 = nextEnd;
     }
     else
     {
         NextKey1 = nextEnd;
     }
 }
 internal ObjectStateEntryDbDataRecord(RelationshipEntry cacheEntry)
 {
     Contract.Requires(cacheEntry != null);
     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;
     }
 }
Beispiel #8
0
        internal ObjectStateEntryDbDataRecord(RelationshipEntry cacheEntry)
        {
            DebugCheck.NotNull(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)
        {
            DebugCheck.NotNull(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 void SetNextRelationshipEnd(EntityKey entityKey, RelationshipEntry nextEnd)
 {
     DebugCheck.NotNull((object)entityKey);
     Debug.Assert(entityKey.Equals(Key0) || entityKey.Equals(Key1), "EntityKey mismatch");
     if (entityKey.Equals(Key0))
     {
         NextKey0 = nextEnd;
     }
     else
     {
         NextKey1 = nextEnd;
     }
 }
Beispiel #11
0
 internal override string GetCLayerName(int ordinal, StateManagerTypeMetadata metadata)
 {
     RelationshipEntry.ValidateRelationshipRange(ordinal);
     return(this._relationshipWrapper.AssociationEndMembers[ordinal].Name);
 }