The example services mean this: http://services.odata.org/V4/Northwind/Northwind.svc/
My question is:
Why this service has a ".svc" suffix? As I know, now only two ways can implement odata v4 services on .Net platform, RESTier and WebAPI, see http://odata.github.io/, but both of them not have ".svc". In fact, wcf data services has ".svc", but wcfds not support odata v4.
This example service's response body is high optimization, like this:
HTTP/1.1 200 OK Cache-Control: private Content-Length: 2015 Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 Expires: Sat, 24 Oct 2015 05:10:34 GMT Vary: * Server: Microsoft-IIS/8.0 X-Content-Type-Options: nosniff OData-Version: 4.0; X-AspNet-Version: 4.0.30319 ... {"@odata.context":"http://services.odata.org/V4/Northwind/Northwind.svc/$metadata","value":[{"name":"Categories","kind":"EntitySet","url":"......
just one line, like wcfds again, but my service like this:
HTTP/1.1 200 OK Cache-Control: no-cache Pragma: no-cache Content-Type: application/json; odata.metadata=minimal; charset=utf-8 Expires: -1 Vary: Accept-Encoding Server: Microsoft-IIS/7.5 OData-Version: 4.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Sat, 24 Oct 2015 06:56:24 GMT Content-Length: 364 { "@odata.context":"http://192.168.1.99:908/api/$metadata","value":[ { "name":"Test","kind":"EntitySet","url":"Test" },{ "name":"TDefStoreEmp","kind":"EntitySet","url":"TDefStoreEmp" },{ "name":"TDefEmp","kind":"EntitySet","url":"TDefEmp" },{ "name":"TDefStore","kind":"EntitySet","url":"TDefStore" } ] }
too many lines, how did one line?
So I suspect the example service is based on wcfds, but how it can support V4? in fact, i like wcfds, because it don't need any Controllers, i just want expose a database but don't want open 1433 port on the internet.
My english is not good, please understand and help me, thanks!