OData Protocol and WCF Data Services<br />Morris Bahrami<br />
What is OData Protocol?<br />OData  (Open Data) Protocol is a Web protocol for querying and updating data.<br />It is base...
OData Protocol  <br />It can be used as a general purpose interface for exposing Create Retrieve Update Delete (CRUD) oper...
What is REST?<br />Representational State Transfer (REST) is a software architecture for stateless client-server communica...
REST and OData<br />REST is an architecture style and design pattern.<br />OData is a specific protocol implementing REST....
What is WCF Data Services?<br />WCF Data Services expose and consume OData feeds.<br />
WCF Programming Models<br />From http://blogs.msdn.com/b/endpoint/archive/2010/01/04/wcf-data-services-ria-services-alignm...
WCF Programming Models<br />SOAP Services  - The original WCF . Best for method based interfaces, needing message based se...
WCF Programming Models<br />WebHttp Services  (WCF REST) –  Best for exposing method based HTTP services or building a RES...
Exposing data as a OData feed<br />Define the data model. WCF Data Services natively supports ADO.NET Entity Framework. Yo...
Accessing data service resources<br />In OData, you address any data exposed by the data model by using a URI. <br />http:...
Some query options<br />
Query operators<br />
Upcoming SlideShare
Loading in...5
×

OData and WCF Data Services

3,224
-1

Published on

OData (Open Data) Protocol is a Web protocol for querying and updating data from sources such as relational databases, file systems or Web sites. It implements a REST (REpresentational State Transfer) interface and as such provides an easy way for querying data through URL address. WCF Data Services is the Microsoft implementation of OData. This presentation describes these concepts and shows how to create a WCF Data Service to query a database using URL address.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,224
On Slideshare
0
From Embeds
0
Number of Embeds
33
Actions
Shares
0
Downloads
58
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

OData and WCF Data Services

  1. 1. OData Protocol and WCF Data Services<br />Morris Bahrami<br />
  2. 2. What is OData Protocol?<br />OData (Open Data) Protocol is a Web protocol for querying and updating data.<br />It is based on HTTP, AtomPub, JSON and XML.<br /> It can be used to expose and access information from sources such as relational databases, file systems, content management systems or traditional Web sites.<br />
  3. 3. OData Protocol <br />It can be used as a general purpose interface for exposing Create Retrieve Update Delete (CRUD) operations on a data model. <br />It performs the CRUD based on existing HTTP methods: Create – POST, Retrieve- GET, Update - PUT , Delete – DELTE.<br />
  4. 4. What is REST?<br />Representational State Transfer (REST) is a software architecture for stateless client-server communication.<br />Conforming to the REST constraints is referred to as being "RESTful". <br />REST uses existing HTTP verbs such as GET, PUT, POST and DELETE.<br />
  5. 5. REST and OData<br />REST is an architecture style and design pattern.<br />OData is a specific protocol implementing REST.<br />
  6. 6. What is WCF Data Services?<br />WCF Data Services expose and consume OData feeds.<br />
  7. 7. WCF Programming Models<br />From http://blogs.msdn.com/b/endpoint/archive/2010/01/04/wcf-data-services-ria-services-alignment-questions-and-answers.aspx<br />
  8. 8. WCF Programming Models<br />SOAP Services - The original WCF . Best for method based interfaces, needing message based security, other channels in addition to HTTP, or hosting outside of IIS. <br />Workflow Services -Is used for sending and receiving Windows Workflow Foundation (WF) messages.<br />RIA Services – Best for building Silverlight applications.<br />
  9. 9. WCF Programming Models<br />WebHttp Services (WCF REST) – Best for exposing method based HTTP services or building a RESTful service with full control over the URI format. <br />Data Services – Best when you are exposing your data model and associated logic through a RESTful interface. It includes a full implementation of the Open Data (OData) Protocol. <br />
  10. 10. Exposing data as a OData feed<br />Define the data model. WCF Data Services natively supports ADO.NET Entity Framework. You can use any data model that implements IQueryable and IUpdateable interfaces.<br />Create the data service. It is a class that inherits from the DataServiceclass, with a type T that is the namespace-qualified name of the entity container. <br />Configure the data service.<br />
  11. 11. Accessing data service resources<br />In OData, you address any data exposed by the data model by using a URI. <br />http://server1/DS1.svc/Employees<br />http://server1/DS1.svc/Employees(2)<br />http://server1/DS1.svc/Employees(2)/FirstName/$value<br />http://server1/DS1.svc/Employees?$filter=FirstNameeq ‘Tom’<br />
  12. 12. Some query options<br />
  13. 13. Query operators<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×