Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debugging Web API Hello World
Message
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Divers
Thread ID:
01650768
Message ID:
01650775
Vues:
29
>2. Below is the code of the WebApiConfig class. Could someone please explain it - in English - as simply as possible (if possible).
>
>
>   public static class WebApiConfig
>    {
>        public static void Register(HttpConfiguration config)
>        {
>            // Web API configuration and services
>
>            // Web API routes
>            config.MapHttpAttributeRoutes();
>
>            config.Routes.MapHttpRoute(
>                name: "DefaultApi",
>                routeTemplate: "api/{controller}/{id}",
>                defaults: new { id = RouteParameter.Optional }
>            );
>        }
>    }
>
>

I have a questions regarding the the MapHttpRoute method (above). I read in a book that "the MapHttproute method simply adds a new entry in a dictionary that stores all the routes." Where is this 'dictionary'? In which format is it?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform