I'm new with attribute routing with aspnet web api.
public class UsersController : ApiController
{
[GET("users/me/brands/{id}")]
public IEnumerable<Brand> GetBrands(long id)
{
return _repository.FindByUser(id);
}
}
but I could not reach this action. I've tried so many ways:
http://example.com/api/users/brands/4
http://example.com/api/users/brands?id=4
http://example.com/users/brands?id=4
http://example.com/users/brands/4
PS: I also mapped as [GET("api/users/me/brands/{id}")]
What I'm missing?