I'm using ASP.NET Core. The convention is that the routing system considers a FooController
class to be a controller with the name Foo
.
I need to override this convention. I want to do something like this:
[ControllerName("Bar")]
public class SomeArbitraryName : Controller {
}
Or like this:
public class SomeArbitraryName : Controller("Bar") {
}
Is that possible somehow?
EDIT: No that linked "duplicate" question is not for ASP.NET Core!