The type or namespace IHttpActionResult not found

前端 未结 11 2004
小鲜肉
小鲜肉 2021-01-31 14:04

This is the first time I am creating a Web API application in ASP.NET MVC4. I opened a new Web API project and added a new controller named \'Product\'. The function given below

11条回答
  •  生来不讨喜
    2021-01-31 14:25

    The features you are trying to use are part of Web API 2. Since you mentioned you're using MVC 4, I expect you will want to upgrade your references to MVC 5 and Web API 2.

    Find out more about these features at http://www.strathweb.com/2013/06/ihttpactionresult-new-way-of-creating-responses-in-asp-net-web-api-2/

提交回复
热议问题