コード例 #1
0
        private void HandlePendingEntityCollection()
        {
            var navigationProperty = this.pendingEntityCollection as INavigationProperty;

            if (navigationProperty != null)
            {
                EntityReadingHelper.ReadCollectionNavigationProperty(this.readContext, navigationProperty);
            }
            else
            {
                EntityReadingHelper.ReadEntitySet(this.readContext, this.pendingEntityCollection.As <IEntitySet>());
            }

            this.pendingEntityCollection = null;
        }
コード例 #2
0
        private void HandlePendingEntityCollection(IEnumerable <KeyValuePair <string, object> > keys)
        {
            var navigationProperty = this.pendingEntityCollection as INavigationProperty;

            if (navigationProperty != null)
            {
                var deserializedKeys = GetDeserializedKeys(keys, navigationProperty.TargetType);
                EntityReadingHelper.ReadCollectionNavigationProperty(this.readContext, navigationProperty, deserializedKeys);
            }
            else
            {
                var entitySet        = this.pendingEntityCollection.As <IEntitySet>();
                var deserializedKeys = GetDeserializedKeys(keys, entitySet.EntityType);
                EntityReadingHelper.ReadEntitySet(this.readContext, entitySet, deserializedKeys);
            }

            this.pendingEntityCollection = null;
        }