I am using ODATA in my WebApi controller.
Id ProductID SubProductID ProductName
1 111 NULL Car
2 111 666 Wheels
3 111 777 Seats
4 112 123 brakes
https://localhost:30004/api/ProductManagement/Product?$filter=ProductName eq 'Car'
Car is the main Product and Wheels,Seats are subproducts.When I make above call it will retrieve 'Car' but my requirement is to get also sub products related to Car.
Car ProductID is 111 and Wheels,Seats ProductID is also 111.
So I am looking for a ODATA query where it will return Car and its subproducts.Something like below but I know only name of ProductName "Car" but not ProductID.
My requirement is to get a record with ProductName "Car" and use its ProductID "111" in the same call or query.
https://localhost:30004/api/ProductManagement/Product?$filter=ProductName eq 'Car' and ProductID = Product.ProductID