You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
621 B

2 years ago
2 years ago
2 years ago
  1. using System.Web.Http;
  2. namespace WebApp
  3. {
  4. public static class WebApiConfig
  5. {
  6. public static void Register(HttpConfiguration config)
  7. {
  8. //config.Routes.MapHttpRoute(
  9. // name: "DefaultApi",
  10. // routeTemplate: "api/{controller}/{data}",
  11. // defaults: new { data = RouteParameter.Optional }
  12. //);
  13. config.Routes.MapHttpRoute(
  14. name: "DefaultApi",
  15. routeTemplate: "api/{controller}/{action}/{id}",
  16. defaults: new { id = RouteParameter.Optional }
  17. );
  18. }
  19. }
  20. }