【发布时间】:2017-09-06 05:43:55
【问题描述】:
我正在迁移使用 ASP.NET WebAPI 2 开发的 REST API。在此实现中,我使用旧样式的 url 来执行我的操作,例如
http://example.com/apiserver/api/v1/members/getbynumber?membershipNo=109900036319 但是当迁移到 .Net core 2.0 时,我看到操作的默认 url 样式类似于 http://example.com/apiserver/api/v1/members/109900036319,我没有看到任何关于如何使用旧样式的示例。
如何设置我想使用哪一个或同时支持这两种方案。 提前致谢。
【问题讨论】:
标签: url asp.net-web-api asp.net-web-api2 asp.net-core-mvc