davidebbo / WebActivator

Apache License 2.0
242 stars 49 forks source link

BundleConfig.RegisterBundles with WebActivatorEx? #20

Closed ronhowe closed 10 years ago

ronhowe commented 10 years ago

I am new to WebActivatorEx. I found it by nugetting the Unity boostrapper for MVC and Web API. I really liked how it didn't require me to edit anything to start working immediately and they didn't collide. (Unity.Mvc4 and Unity.WebApi both edit the same file and put in different dependency injectors.)

Anywho...

Is it possible to use WebActivatorEx for all of the things that the default MVC project template places into the Global.asax.cs App_Start() method?

BundleConfig.RegisterBundles requires BundleTable.Bundles to be passed in, but the WebActivatorEx.PreApplicationStartMethod() method doesn't allow for the parameters of the type referenced to be passed in.

Just a thought.

Keep up the great work!

davidebbo commented 10 years ago

Thanks for the good feedback!

I would think you could just take everything from Application_Start and put it in a PreAppStart method. Not sure I understand the issue you describe with parameters. PreAppStart doesn't take params, but neither does Application_Start where MVC normally puts this logic.

ronhowe commented 10 years ago

That should work.