排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2025TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
公网安备:
50010702506256


欢迎加群交流技术
原
WEBAPI报错:Attribute routes with the same name 'Get' must have the same template

是因为 asp.net core 中默认创建的 api controller 中的 Get(id) Action的属性都是[HttpGet("{id}", Name = "Get")],后面这个Get就重复了,修改一下名称即可。
也就是如图,下面两个名字不能一样(默认创建的时候是一样的)
另外一个webapi需要修改一下名字:
欢迎加群讨论技术,1群:677373950(满了,可以加,但通过不了),2群:656732739。有需要软件开发,或者学习软件技术的朋友可以和我联系~(Q:815170684)
评价