How do I retrieve the @odata.context value from a request to a aspnetcore 2.1 using odata v4 (microsoft aspnetcore.odata 7.0.1) inside the controller?
I needed to form my response as
{ "@odata.context":"https://localhost:5001/odata/$metadata#Products/$entity",
"value" :[{ "id":"b79a6aa2-ed65-400c-8f7d-42052412b0b4"}]
}
rather than ``{"@odata.context":"https://localhost:5001/odata/$metadata#Products/$entity","id":"b79a6aa2-ed65-400c-8f7d-42052412b0b4"}
Thank you!! Alberto