How to achieve a dynamic controller and action method in ASP.NET MVC?
Absolutely! You’ll need to override the DefaultControllerFactory to find a custom controller if one doesn’t exist. Then you’ll need to write an IActionInvoker to handle dynamic action names. Your controller factory will look something like: public class DynamicControllerFactory : DefaultControllerFactory { private readonly IServiceLocator _Locator; public DynamicControllerFactory(IServiceLocator locator) { _Locator = locator; } protected override … Read more