Open piyushparate1 opened 6 years ago
Hi @piyushparate1: $expand is a widely used system query, therefore likely the issue is due to client code.
From GetModel() and the csdl model generated, Customer entity type have navigation property "ShoppingCart", neither "Product" nor "Products". That is why the first two query doesn't expand the product. As for the third query, "/Customers?$expand=ShoppingCart": from you Get() method,
I would suggest debugging this a little bit to make sure the data source is populate correctly; using ContainsTarget = false for shoppingCartNavigation. For further details, you can checkout this tutorial http://odata.github.io/odata.net/#02-03-define-entity-relations, which contains some samples.
Thank you so much @biaol-odata, for your response. I am new in this, didnt knew that - only navigation property can use in url.
Still it doesnt returning the child record. Do we need to add one more controller to handled child records?
My code is in https://github.com/piyushparate1/SampleODataUntyped
Hi I am facing some issue in $expand odata api.
https://stackoverflow.com/questions/50265218/expand-not-working-associate-child-records-not-returned-in-result
Could you please help.
Thanks.