public static class WebApiConfig { public static void Register(HttpConfiguration config) { config.Routes.MapHttpRoute( name: "DefaultApiWithVersion", routeTemplate: "api/v{version}/{controller}/{action}/{id}", defaults: new { id = RouteParameter.Optional } ); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{action}/{id}", defaults: new { id = RouteParameter.Optional } ); // Uncomment the following line of code to enable query support for actions with an IQueryable or IQueryable<T> return type. // To avoid processing unexpected or malicious queries, use the validation settings on QueryableAttribute to validate incoming queries. // For more information, visit ?LinkId=279712. //config.EnableQuerySupport(); // To disable tracing in your application, please comment out or remove the following line of code // For more information, refer to: config.EnableSystemDiagnosticsTracing(); } }
,相关文章
- 使用web api开发微信公众号,调用图灵机器人接口(一)
- 用ASP.NET Web API技术开发HTTP接口(一)
- 用ASP.NET Web API技术开发HTTP接口
- Web API接口 安全验证
- 用.Net Core框架创建一个Web API接口服务器
- 【ASP.NET Core】ASP.NET Core API 版本控制
- 第一次写Web API接口
- 使用ASP.NET Core完成Web API接口
- ABP 教程文档 1-1 手把手引进门之 AngularJs, ASP.NET MVC, Web API 和 EntityFramework(官方教程翻译版 版本3.2.5)含学习资料
- 通过HttpClient来调用Web Api接口,实体参数的传递