O'Reilly logo

ASP.NET Web API 2 Recipes: A Problem Solution Approach by Filip Wojcieszyn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 12

image

OData

In this chapter, I will briefly introduce ASP.NET Web API support for OData, the Open Data Protocol. You will learn how to do the following:

  • Create a simple OData service in ASP.NET Web API (Recipe 12-1)
  • Create centralized and attribute-based OData routes (Recipe 12-2)
  • Work with OData Query Options (Recipe 12-3)
  • Support OData functions and actions in ASP.NET Web API (Recipe 12-4)

12-1. Creating OData Services in Web API

Problem

You would like to create an OData service using ASP.NET Web API.

Solution

The easiest way to get started with OData in Web API is to use the ASP.NET scaffolder to generate OData controllers for you. To ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required