Which PreApplicationStartMethod should I use?

后端 未结 1 1453
执念已碎
执念已碎 2021-02-14 17:59

I noticed that when I installed StructureMap from NuGet into my ASP.NET MVC3 project, Dave Ebbo\'s WebActivator package was also added as a dependency.

WebActivator prov

相关标签:
1条回答
  • 2021-02-14 18:37

    NuGet packages for DI containers in ASP.NET MVC 3 usually prefer to use WebActivator to avoid messing with any existing code that you might have in Application_Start. Ninject uses exactly the same approach.

    You can have multiple WebActivator.PreApplicationStartMethod attributes in your application and prior to .NET 4.5 a single System.Web.PreApplicationStartMethodAttribute.

    0 讨论(0)
提交回复
热议问题