ASP.NET MVC + fluent nNibernate, what IoC tool?

前端 未结 4 808
渐次进展
渐次进展 2020-12-31 19:00

I\'m working on a ASP.NET MVC project where we have decided to use Fluent nHibernate for dataccess. To enable loose coupling we go for a IoC/DI pattern. My questions is what

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-31 19:07

    I use Munq which is lightweight and fast and is a simple way to add a DI Container to MVC3 projects via Nuget. Up to now I haven't found any need to move to a different framework - Munq has been very adequate.

    PM> install-package Munq.MVC3
    

    This adds App_Start\MunqMvc3Startup.cs to the project, and this is where dependencies should be registered.

提交回复
热议问题