Skip to content

Instantly share code, notes, and snippets.

@ranhsd
Created November 23, 2019 19:44
Show Gist options
  • Save ranhsd/3d06f237086ab7630b2542aea1a8eeb4 to your computer and use it in GitHub Desktop.
Save ranhsd/3d06f237086ab7630b2542aea1a8eeb4 to your computer and use it in GitHub Desktop.
odata expand example
<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xml:base="http://localhost:8080/odata/">
<id>http://example.org/odata/CarModels(1L)</id>
<title type="text">CarModels</title>
<updated>2019-04-07T11:33:38.467-03:00</updated>
<category term="default.CarModel"
scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link href="CarModels(1L)" rel="edit" title="CarModel"/>
<link href="CarModels(1L)/CarMakerDetails"
rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/CarMakerDetails"
title="CarMakerDetails"
type="application/atom+xml;type=entry">
<m:inline>
<entry xml:base="http://localhost:8080/odata/">
<id>http://example.org/odata/CarMakers(1L)</id>
<title type="text">CarMakers</title>
<updated>2019-04-07T11:33:38.492-03:00</updated>
<category term="default.CarMaker"
scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link href="CarMakers(1L)" rel="edit" title="CarMaker"/>
<link href="CarMakers(1L)/CarModelDetails"
rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/CarModelDetails"
title="CarModelDetails"
type="application/atom+xml;type=feed"/>
<content type="application/xml">
<m:properties>
<d:Id>1</d:Id>
<d:Name>Special Motors</d:Name>
</m:properties>
</content>
</entry>
</m:inline>
</link>
<content type="application/xml">
<m:properties>
<d:Id>1</d:Id>
<d:Maker>1</d:Maker>
<d:Name>Muze</d:Name>
<d:Sku>SM001</d:Sku>
<d:Year>2018</d:Year>
</m:properties>
</content>
</entry>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment