Jump to content

Photo

oData Expand Query

WebApi oData

  • Please log in to reply
2 replies to this topic

#1 Sherif Ahmed

Sherif Ahmed

    Advanced Member

  • Members
  • PipPipPip
  • 35 posts

Posted 22 April 2019 - 16:45

Hello,

 

I'm try to expand the category in the product to get it's name like below:

 

http://demo.smartsto...gories/Category

 

but I'm getting an error says:

 

The query specified in the URI is not valid. Could not find a property named 'Category' on type 'SmartStore.Core.Domain.Catalog.ProductCategory'.

 

Is this an issue or by (your or oData) design?

 

Regards,


Sherif Ahmed

Software Engineer

Egypt


#2 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3823 posts

Posted 23 April 2019 - 10:26

The category property does not have the DataMember attribute, that's why it is not expanded. I will add the missing attribute so that the above endpoint works correctly.


Marcus Gesing

Smartstore AG


#3 Sherif Ahmed

Sherif Ahmed

    Advanced Member

  • Members
  • PipPipPip
  • 35 posts

Posted 24 April 2019 - 05:58

Thank you so much


Sherif Ahmed

Software Engineer

Egypt



Also tagged with one or more of these keywords: WebApi, oData