How to Instantiate ODataQueryOptions
Sure. ODataPath is a list of ODataPathSegment(s) which should follow up the OData Uri spec.
In Web API OData, it's easy to instantiate an ODataPath, for example:
IEdmModel model = GetEdmModel();
IEdmEntitySet entitySet = model.EntityContainer.FindEntitySet(setName);
ODataPath path = new ODataPath(new EntitySetPathSegment(entitySet));
The above path
follows up the OData spec that it has the odata template as:
~/entityset
More test cases (codes) can be found here