Query parameter route constraints

瘦欲@ 提交于 2019-11-29 07:49:06
Michael Skarum

According to http://attributerouting.net/#asp-net-web-api(†), this is not possible:

"Beware! Due to integration issues with the Web API WebHost framework, the following features will not work: …

  • querystring parameter constraints, …"

†) Note that this answer was written for a previous version of Web API where attribute routing was done using a separate AttributeRouting.WebApi NuGet package. Attribute routing has since been incorporated into the Web API core. Nevertheless, it appears that constraints on query string parameters are still not supported out of the box.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!