I'm developing an ASP.NET Web Api app with .NET Framework 4.0 and C#.
I have this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace MyProject.Web.Api.Controllers
{
public class UserADController : ApiController
{
[HttpGet]
[Route("api/UserAD/GetAllUsers")]
public HttpResponseMessage GetAllUsers()
{
HttpResponseMessage response = null;
return response;
}
}
}
But there isn't a RouteAttribute on System.Web.Http.dll (this is in \packages\Microsoft.AspNet.WebApi.Core.4.0.30506.0\lib\net40\System.Web.Http.dll).
Attribute Routing is native in ASP.NET MVC 5, or later, and ASP.NET Web API 2.
What is the equivalent for this Route attribute in this ASP.NET version?
