none
How have more than two expands in Url address with restier RRS feed

  • Question

  • I have a RESTier service and I need to use more than two expand in browser Url like below:

    http://localhost:64747/api/SI24/Customers?$filter=Id%20eq%2067922&$expand=Bns($expand=Parvandes($expand=ParvandeStateLogs))


    I am not allowed to make any controller for this service. If you see in my url, you can understand that I must navigate between four tables. The tables are Customers , Bns , Parvandes , ParvandeStateLogs. How can I join these four tables with expand in url(like upper address)?
    Tuesday, July 30, 2019 11:49 AM

All replies

  • Hi MoSal,

    Thank you for posting here.

    According to your description, I couldn’t understand your requirement clearly. I don’t know the relationship between each table.

    If you want to select multiple table with joining, I suggest you could try to use 

      http://localhost:64747/api/SI24/Customers$expand= Bns , Parvandes , ParvandeStateLogs

    Details ,you could refer to below link:
    https://www.odata.org/documentation/odata-version-2-0/uri-conventions/#ExpandSystemQueryOption

    Besides, please suggest OP post the thread to asp.net forum.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, July 31, 2019 9:23 AM
    Moderator