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
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/