O'Reilly logo

Building Mobile Applications Using Kendo UI Mobile and ASP.NET Web API by Ragini Kumbhat Bhandari, Nishanth Nair

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

Routing

Routing, simply put, is the process of receiving a request and mapping it to a controller action. If you are familiar with MVC routing, you will find that Web API routing is similar to it but with some differences; Web API uses the HTTP request type instead of the action name in the URL (as in the case of MVC) to select the action to be executed in the controller.

Routing configuration for Web API is defined in the file App_Start\WebApiConfig.cs. The default routing configuration of ASP.NET Web API is as shown in the following:

namespace MovieTickets.WebAPI
{
    public static class WebApiConfig
    {
        public static void Register(HttpConfiguration config)
        {
            config.Routes.MapHttpRoute(
                 name: "DefaultApi",
 routeTemplate: "api/{controller}/{id}", ...

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