May 2017
Intermediate to advanced
424 pages
8h 43m
English
This class provides the information for Web API-related configuration, including specific Web API routes, services, and other settings:

Here, we will define how to handle null values at the time of the deserialization of objects and we will also define the routes. Instead of calling Routes.MapRoutes, as in the MVC RouteConfig class, we instead call Config.Routes.MapHttpRoutes using the following code:
// Web API routes config.MapHttpAttributeRoutes(); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional ...Read now
Unlock full access