You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*A navigation property is used to identify a relationship between two resources.*
6
+
7
+
## Problem
8
+
--------
9
+
10
+
Resources often contain information that identifies other related resources. Often that information is contained in a returned representation as an id value. In order for a client to access the related resource it must request the primary resource, read the id value of the related resource and then construct a URL to the related resource using the Id value. This requires at least two round trips and requires the client know how to construct the URL to the related resource.
11
+
12
+
## Solution
13
+
--------
14
+
15
+
Navigation properties are an OData convention that allows an API designer to create a special property in a model that references an related entity. In the HTTP API this property name translates to a path segment that can be appended to the URL of the primary resource in order to access a representation of the related resource. This prevents the client from needing to know how to construct the URL to the related resource and the client does not need to retrieve the primary resource if it is only interested in the related resource. It is the responsibility of the API implementation to determine the ID of the related resource and return the representation of the related entity.
16
+
17
+
Additionally, using the OData Expand query parameter, related entities can be transcluded into the primary entity so both can be retrieved in a single round trip.
18
+
19
+
## Issues and Considerations
20
+
-------------------------
21
+
22
+
Cross workload expands don't work.
23
+
24
+
25
+
## When to Use this Pattern
26
+
------------------------
27
+
28
+
*Describe when and why the solution is applicable and when it may not.*
0 commit comments