.net core api action 不能用作 httpget注释的参数名

 

        [HttpGet("{Act}/{UserID}", Name = "GetDevList")]       //action不能用,act改为action,编译无问题,测试时提示404
        public string Get(string Act, string UserID)
        {
            return UserID + Act + Request.Host;
        }

 

posted @ 2020-10-28 18:21  jopny  阅读(249)  评论(0编辑  收藏  举报