2
votes

I would like to expand all navigation properties in my odata service...

public class Order
{
     Product Product {get;set;}
}

public class Product
{
     Category Category {get;set;}
}

public class Category
{
     string Name {get;set;}
}

How do I show all of these navigation properties? This is what I have

/odata/Orders?$expand=Product

how do I also show the category??

1

1 Answers

9
votes

Try this:

/odata/Orders?$expand=Product($expand=Category)

You can check with odata sample service:

http://services.odata.org/V4/(S(snopayoxlhy2hc4bpjgatvfj))/TripPinServiceRW/People?$expand=Friends($expand=Photo)