Skip to content

Instantly share code, notes, and snippets.

@ODataTeam
Last active August 29, 2015 14:03
Show Gist options
  • Save ODataTeam/422856c7406f9b555f8c to your computer and use it in GitHub Desktop.
Save ODataTeam/422856c7406f9b555f8c to your computer and use it in GitHub Desktop.
Create an ODataUriParser instance
Uri serviceRoot = new Uri("http://services.odata.org/V4/OData/OData.svc");
IEdmModel model = EdmxReader.Parse(XmlReader.Create(serviceRoot + "/$metadata"));
Uri fullUri = new Uri("http://services.odata.org/V4/OData/OData.svc/Products");
ODataUriParser parser = new ODataUriParser(model, serviceRoot, fullUri);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment