C# 向响应添加HATEOAS链接
我正在努力在回复中加入hateoas链接。 具体来说,对于kitIncludes字段。我想有一个链接到每个记录。 例如,产品/组件 我在哪里有这个链接?这会是一个领域中的领域吗?还是应该在淘汰字段下的链接中C# 向响应添加HATEOAS链接,c#,rest,asp.net-web-api,hateoas,C#,Rest,Asp.net Web Api,Hateoas,我正在努力在回复中加入hateoas链接。 具体来说,对于kitIncludes字段。我想有一个链接到每个记录。 例如,产品/组件 我在哪里有这个链接?这会是一个领域中的领域吗?还是应该在淘汰字段下的链接中 { "links": [ { "rel": "self", "href": "http://localhost:60778/v2/products?page=0&limit=100" }, { "rel": "f
{
"links": [
{
"rel": "self",
"href": "http://localhost:60778/v2/products?page=0&limit=100"
},
{
"rel": "first",
"href": "http://localhost:60778/v2/products?page=0&limit=100"
},
{
"rel": "last",
"href": "http://localhost:60778/v2/products?page=0&limit=100"
}
],
"metadata": {
"totalRecords": 1
},
"entities": [
{
"additionalDimensions": null,
"assemblyInstructionsUrl": null,
"detailedDescription": null,
"dimensionSketch": null,
"kitIncludes": [
{
"sku": "jason-component",
"quantity": 12
}
],
"fobBasePrice": 0,
"friendlyDescription": null,
"itemsPerCase": 1,
"itemType": "Kit",
"itemWeightKg": 0,
"itemWeightLbs": 0,
"knockout": null,
"links": [
{
"rel": "self",
"href": "/products/JASON-KIT"
},
{
"rel": "series",
"href": "/series/"
}
],
"manufacturerWarrantyDays": 0,
"mechanismGuideUrl": null,
"partsDrawingUrl": null,
"productDetails": null,
"productVideo": null,
"upc": null,
"vendorName": "Test"
}
]
}
我在哪里有这个链接
你可能想看看
- 李>