Presentation is loading. Please wait.

Presentation is loading. Please wait.

Build a RESTful service with OData

Similar presentations


Presentation on theme: "Build a RESTful service with OData"— Presentation transcript:

1 Build a RESTful service with OData
Congyong Su Senior Software Engineering Manager Microsoft

2 Why RESTful service? API leverages the semantics of HTTP
Verbs: Post, Get, Put/Patch, Delete Methods: Create, Read, Update, Delete Uri: Resource hierarchy Status: 200 OK, 404 Not Found Content: application/json API integration to web Foundation piece for dynamic web – for example, the MVVM pattern Reach Desktop, phone, device, etc.

3 Why OData service? Consistency Conventions Rich query
REST is an architectural style Conventions API path inferred POST ~/Customers GET ~/Customers GET ~/Customers/{id} PATCH ~/Customers/{id} DELETE ~/Customers/{id} Rich query filter, select, expand, orderby, top, skip, count

4 How to build an OData service
OData Web API If you are familiar to Model-View-Controller: MVC Start from small Low-level control RESTier If you used and miss WCF Data Services Focus on business logic

5 Standard Solution: OData v4 Web API
Model builder ODataConventionModelBuilder Routing MapODataServiceRoute Controller ODataController Query EnableQueryAttribute

6 Demo: OData v4 Web API

7 Why RESTier? Web API is easy, but require a controller per entity set
ODataLib is powerful, but with low-level APIs Zero controller is possible Focus on business logic

8 What is RESTier? A turnkey solution to build RESTful API services Builds upon OData v4 Web API and ODataLib

9 Demo: RESTier

10 Summary OData v4 Web API is easy to start with RESTier is another layer of abstraction on top of OData Web API

11 Questions?


Download ppt "Build a RESTful service with OData"

Similar presentations


Ads by Google