Which .NET dependency injection framework do you u

2020-02-09 18:26发布

Currently there are quite a few DI/IoC-frameworks for .NET out there (http://www.hanselman.com/blog/ListOfNETDependencyInjectionContainersIOC.aspx). I find it quite hard to choose. Therefore I wanted to measure the public opinion and see which framework is the most popular - so please post your favorite framework here and let the people vote...

7条回答
家丑人穷心不美
2楼-- · 2020-02-09 18:53

StructureMap

I love the fact that I can configure it all using the fluent interface (aka Configuration DSL). Typesafe configuration is a must when I do refactoring.

查看更多
We Are One
3楼-- · 2020-02-09 18:53

Unity It's simple and unintrusive, yet type-safe. And it is created by Microsoft Pattern & Pratices group.

查看更多
SAY GOODBYE
4楼-- · 2020-02-09 18:53

Have a look at Structuremap which is a Dependency Injection / Inversion of Control tool for .Net

查看更多
成全新的幸福
5楼-- · 2020-02-09 18:56

I'm currently using Castle.Windsor. Mainly because of the integration it has with the Rhino Tools library.

查看更多
爷的心禁止访问
6楼-- · 2020-02-09 18:57

Autofac. Type-safe and plays well with code-refactoring. Apart from the boiler-plate stuff, I found the delegate factories to be very useful.

查看更多
我想做一个坏孩纸
7楼-- · 2020-02-09 19:17

I've been watching Kzu (creator of Moq)'s screencast series as he develops Funq - a DI framework that makes extensive use of lambdas the same way Moq does. No release yet but I'm looking forward to trying it out.

查看更多
登录 后发表回答