BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News OData Scaffolding is Visual Studio 2013

OData Scaffolding is Visual Studio 2013

Bookmarks

One of the new features in VS 2013 is OData Scaffolding. Like MVC Scaffolding, this feature is designed as both a training aid and to speed development. However, it requires a bit more setup than the MVC version. To help you out, Kirthi of Microsoft has created a walk-through on OData Scaffolding.

The most important thing to remember after creating a Web API based OData endpoint is to update the WebApiConfig. By convention, the WebApiConfig is a static class with a single method called Register(HttpConfiguration config). Within this method an ODataConventionModelBuilder is used to actually map the model to an EDM Model. This model is then registered as a route.

If the website was originally created without Web API support you will also need to add this line to the Application_Start event:

GlobalConfiguration.Configure(WebApiConfig.Register);

This method is meant to be used to register routes for the OData controllers and is invoked as a callback to GlobalConfiguration.Configure.

Rate this Article

Adoption
Style

BT