I have an api controller:
[RoutePrefix("api/users")]
[Authorize]
public class UsersController : ApiController
that has two Get methods:
[HttpGet]
[Route("")]
public async Task<HttpResponseMessage> Get(ODataQueryOptions<ApplicationUser> options)
{
return Request.CreateResponse(HttpStatusCode.OK, new List<ApplicationUser>());
}
[HttpGet]
[Route("")]
public async Task<HttpResponseMessage> Get()
{
return Request.CreateResponse(HttpStatusCode.OK, new List<ApplicationUser>());
}
Calling http://mysite/api/users?$filter=FirstName eq 'George' or Calling http://mysite/api/users
causes the exception Multiple actions were found that match the request.
Commenting out either method will cause the other to work.
Any help would be appreciated.