Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.60 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web.Http;
  5.  
  6. namespace WebApplication2
  7. {
  8.     public static class WebApiConfig
  9.     {
  10.         public static void Register(HttpConfiguration config)
  11.         {
  12.             // Web API configuration and services
  13.  
  14.             // Web API routes
  15.             config.MapHttpAttributeRoutes();
  16.  
  17.             config.Routes.MapHttpRoute(
  18.                 name: "DefaultApi",
  19.                 routeTemplate: "api/{controller}/{id}",
  20.                 defaults: new { id = RouteParameter.Optional }
  21.             );
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement