1

Is there a concept of Left Join and Right Join in OData. Using $expand system query the result is inner join or left join.Please throw some light on this concept.

Azim
  • 1,043
  • 13
  • 27
prerna30
  • 131
  • 1
  • 2
  • 15

2 Answers2

1

There is a $crossjoin in ODL v4, but it is not implemented now. Fortunately, you can do the join inside an action in a controller that processes an OData Function requests. Please follow this sample:https://aspnet.codeplex.com/SourceControl/latest#Samples/WebApi/OData/v4/ODataFunctionSample/.

Tan Jinfu
  • 3,327
  • 1
  • 19
  • 20
  • Can you please tell if we want inner Join against a service that is using OData v2 .What URL to query ? – prerna30 Jun 20 '14 at 11:45
1

$expand is similar to Left join. For example, Customers?$expand=Orders, it will return all Customers. If there is any order associated with a customer, it will also return the orders as a property of the Customer. You can check the online service http://odatae2etest.azurewebsites.net/demo/DefaultService/Customers?$expand=Orders with the $expand functionality.

zoe
  • 849
  • 6
  • 7
  • What about inner join ? what will be the URL if we want inner Join? Talking from the client perspective – prerna30 Jun 20 '14 at 11:44