DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Data
  4. Understanding OData v3 and WCF Data Services 5.x

Understanding OData v3 and WCF Data Services 5.x

Greg Duncan user avatar by
Greg Duncan
·
Dec. 28, 12 · Interview
Like (0)
Save
Tweet
Share
6.12K Views

Join the DZone community and get the full member experience.

Join For Free

This is an awesome 20 page article about OData and WCF Data Services. If you need an intro to these two, you need to read this article.

CodeProject - Understanding OData v3 and WCF Data Services 5.x


Table of Contents

  • What is this Article About?
  • What are OData, Atom, and AtomPub?
  • REST vs. SOAP: The Design Decisions
  • First look at OData Queries
    • Keywords
    • Formatting
    • OData Clients
  • Working with OData via WCF Data Services
    • Creating a WCF Data Service with POCOs
    • Behind the Scenes
    • Enabling JSON Format through WCF Message Inspector
    • What about JSON light?
    • JSON Light in WCF Data Services 5.2.0
    • Extending Data Service with Service Operations and Interceptors
    • Metadata, EDM, and CSDL
    • Concurrency Updates with ETAG
  • Resources

What is this Article About?

This is not your typical “expose an entity framework model as a WCF Data Service” kind of article; in fact I deliberately omitted Entity Framework from this discussion. Now don’t get me wrong, I have nothing against EF, but you will find a lot of great articles on how to set up a WCF Data Service using EF as data source. 

The discussion is around OData v3 and WCF Data Services 5.0 and 5.2. Of course there is no way I cover all new features or every API available, nor do I need so; I will point you to the resources where you can get all information you need. Instead my aim in this article is to discuss some of the topics that usually remain oblivious to the typical WCF Data Services developer.

What are OData, Atom, and AtomPub?

The Open Data Protocol (OData) is a protocol which standardizes the exposure and consumption of data. In times where data is being exposed at high rates and where consumers connect to more and more data endpoints, it’s important for clients to access these endpoints in a common way.

OData builds on web standards such as Http, Atom, and JSON to provide REST-based access to these endpoints. Data is exposed as entities where each entity can be treated as an Http resource which makes it subject to CRUD (create, read, update, delete) operations.

So how is OData related to Atom and AtomPub?

Atom is way to expose feeds much the same way RSS does. If you are wondering what are the differences between Atom and RSS you can check this site (http://en.wikipedia.org/wiki/Atom_(standard)#Atom_compared_to_RSS_2.0)

Atom by itself allows only feed exposure. If you want to publish data, AtomPub (Atom publishing) provides this ability. AtomPub uses Http verbs GET, POST, PUT, and DELETE to enable data publishing.

OData adds a set of extensions on top of AtomPub to enable more advanced and smart operations such as data retrieval filtration and typed values definition. For example, below are two queries that are made possible through the power of OData:

  • http://server/service.svc/entity/$count
  • http://server/service.svc/entity?$filter=(entityID add 4) eq 8

REST vs. SOAP: The Design Decisions

...

image


Windows Communication Foundation Data (computing) WCF Data Services Web Service

Published at DZone with permission of Greg Duncan, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Upgrade Guide To Spring Data Elasticsearch 5.0
  • Educating the Next Generation of Cloud Engineers With Google Cloud
  • AIOps Being Powered by Robotic Data Automation
  • How To Convert HTML to PNG in Java

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: