Consume an OData WCF Data Service as JSON with JQuery(galratner.com)

submitted by galratnergalratner(334) 1 year, 1 month ago

OData(Open Data Protocol) is an HTTP based protocol for querying and updating data using full REST syntax. The full specifications of OData can be found on http://odata.org WCF Data Services (formerly ADO.NET Data Services, formerly Project Astoria) is the .NET based implementation of OData enabled services. WCF Data Services can use an Entity Framework Context or any data model exposing at least one property that returns an entity set that is an IQueryable(Of T). The model must also implement IUpdatable. A sample http request to an OData service will look like: http://services.odata.org/OData/OData.svc/Categories(1)/Products?$skip=2 This example will get the products associated with the category identified by key value 1, starting with the third product. WCF Data Services is capable of returning data in multiple formats. The default format will be set based on the requesting client’s accept request header with an option to override the format using the $format query option. For example, this will return the results from the previous example in JSON format: http://services.odata.org/OData/OData.svc/Categories(1)/Products?$skip=2&$format=json

add a comment |category: |Views: 52

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story