private void ApplyFeedInNavigationProperty(ResourceProperty navigationProperty, ResourceSetWrapper targetResourceSet, object entityResource, ODataFeed feed)
        {
            ODataFeedAnnotation annotation = feed.GetAnnotation <ODataFeedAnnotation>();

            if (base.Update && ((this.ContentFormat != ContentFormat.VerboseJson) || (annotation.Count > 0)))
            {
                throw DataServiceException.CreateBadRequestError(System.Data.Services.Strings.BadRequest_DeepUpdateNotSupported);
            }
            System.Data.Services.SegmentInfo segmentInfo = Deserializer.CreateSegment(navigationProperty, navigationProperty.Name, targetResourceSet, false);
            foreach (ODataEntry entry in annotation)
            {
                object resourceToBeAdded = this.CreateNestedEntityAndApplyProperties(segmentInfo, entry);
                base.Updatable.AddReferenceToCollection(entityResource, navigationProperty.Name, resourceToBeAdded);
            }
        }
 private void ApplyEntryInNavigationProperty(ResourceProperty navigationProperty, ResourceSetWrapper targetResourceSet, object entityResource, ODataEntry entry)
 {
     if (((this.ContentFormat != ContentFormat.VerboseJson) || (entry != null)) && base.Update)
     {
         throw DataServiceException.CreateBadRequestError(System.Data.Services.Strings.BadRequest_DeepUpdateNotSupported);
     }
     if (entry == null)
     {
         this.SetResourceReferenceToNull(entityResource, navigationProperty);
     }
     else
     {
         System.Data.Services.SegmentInfo segmentInfo = Deserializer.CreateSegment(navigationProperty, navigationProperty.Name, targetResourceSet, true);
         object propertyValue = this.CreateNestedEntityAndApplyProperties(segmentInfo, entry);
         base.Updatable.SetReference(entityResource, navigationProperty.Name, propertyValue);
     }
 }