纽威
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.

24 lines
580 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web.Http;
  5. namespace ICSSoft.WebAPI
  6. {
  7. public static class WebApiConfig
  8. {
  9. public static void Register(HttpConfiguration config)
  10. {
  11. // Web API 配置和服务
  12. // Web API 路由
  13. config.MapHttpAttributeRoutes();
  14. config.Routes.MapHttpRoute(
  15. name: "DefaultApi",
  16. routeTemplate: "api/{controller}/{id}",
  17. defaults: new { id = RouteParameter.Optional }
  18. );
  19. }
  20. }
  21. }