I am able to get the route using this attribute -
[Route("api/[controller]?{n}")]
[HttpGet("{n}")]
I have tried this but I had no luck.
[HttpGet]
public string Get([FromQuery(Name = "n")] long n)
However, my REST request is like -
http://<>/api/test?n=23
My API works with the REST API -
http://<>/api/test/23
I have tried changing the / with ? but no luck.