I've got many actions on my controller and I want to use a specific route only for one action if possible. I'm looking for a way to override the route defined at the controller level.
[Route("api/candidate/attached-file")]
public class AttachedFileController : Controller
{
//overriding controller route
[HttpPost("api/candidate/{id}/attached-file")]
public async Task<IActionResult> AttachFile(string id, [FromBody] AttachedFile file)
{
...
}
//using controller route
[HttpGet("{id}")]
public ActionResult Get(string id) {}
[HttpGet]
public ActionResult GetAll() {}
...
}