What is your opinion on using MVCExtensions with Autofac?

May 24, 2012 at 6:58 AM

I would like to know your opinion on using MVCExtensions with Autofac..

I am using MVC Extensions with Autofac in my MVC 3 web app. I'm just not getting it why these extensions were created? I can't really say that it is makng my life easier. Everything that I did with Autofac in my global.asax.cs file I can do with the MVC extensions. I can register routes, controllers, my services and repositories, etc with just Autofac.

Any opinions why using these MVC extensions is maybe a better way to go?

I need to capture my errors in Application_Error. How do I get an instance of my registered logger? If I need to resolve dependencies some where else in my app how would I do this? This is how I register my logger:

builder.RegisterType<Logger>().As<ILogger>();

I can instantiate my logger but would rather like to use the registered logger.

Is there a tag for these extensions?