What additional advantage does IControllerActivator.Create (new in MVC4) provides when controller can already be custom created (and resolved using DI) by overriding CreateController method of DefaultControllerFactory?
The controller activation logic was pulled out of the default controller factory, and put in the controller activator; so it was done to make it a little more flexible and follow the singular responsibility pattern. Depending on what version of MVC you use, it now uses the controller activator to create the controller. The two work hand-in-hand to get the job done; therefore, you can customize either, and it will function similarly. I don't see there being an advantage one over the other.
See Brad Wilson's blog post about this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With