BT

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

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.