I Have a problem configuring routes in ASP Core.
In Startup.cs I used default configuration: services.AddMvc() in ConfigureServices() and app.UseMvc() in Configure().
Now I have a simple controller in the same assembly:
[Route("/api/[controller]")]
public class TestController: Controller
{
[HttpGet]
public string Test()
{
return "Hello";
}
}
Request /api/test/test doesn't fire
But if i add [HttpGet("test")] or [Route("test")] it works well.
However I'd like to support convention over configuration in case route attribute is not specified