MicrosoftDocs / OData-docs

Creative Commons Attribution 4.0 International
33 stars 113 forks source link

Is it really possible to build web APIs with OData support using ASP.NET Core without using an Entity Data Model (EDM) #180

Closed darraghjones closed 2 years ago

darraghjones commented 3 years ago

https://github.com/MicrosoftDocs/OData-docs/blob/master/Odata-docs/webapi/first-odata-api.md

darraghjones commented 3 years ago

Apparently is it...although it seems some features don't work...? for example i couldn't get paging to work

xuzhg commented 2 years ago

@darraghjones the latest ASP.NET Core 7.x and 8.x support the Web APIs without using EDM. Please try and let us know any problems. Thanks.

darraghjones commented 2 years ago

Thanks for your comment @xuzhg. However, perhaps my question wasn't really clear. The point i was making is that without defining an EDM, the reponse doesn't appear to confirm to the odata 'spec'. i.e. there's no enevelope with an @odata.context attribute for example like there is here: https://services.odata.org/v4/TripPinServiceRW/People

I appreciate I have the abilty to use the odata query syntax in the URL by adding the [EnableQuery] attribute, but I'm not sure if this is sufficent to declare these APIs are being 'Odata'. I'd be interested to hear your thoughts, thanks.