是否有一个.NET的IoC是prefers约定优于配置? [英] Is there a .NET IoC that prefers convention over configuration?

查看:139
本文介绍了是否有一个.NET的IoC是prefers约定优于配置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简单地说,如果你有使用的IoC / DI容器,这就是易于部署,稳定,良好的文档(使用config / xml文件的一切不是一个大风扇),并支持.NET,哪一个会是什么?

Simply put, if you had to use a IoC/DI container, thats easy to deploy (not a big fan of using config/xml file for everything), stable, good documentation and supports .net, which one would it be?

这可能只是我,但喜欢一个用于应用程序,少数为ORM,少数为另一个组件还挺获得压倒性有时太多的XML文件。另外,我认为,如果有做的事情(约定)搞乱的东西了较少的机会的一种方式的方式。

It could just be me but too many xml files like one for the app, a few for ORM, a few for another component kinda gets overwhelming at times. Also, the way I see it, if there is one way of doing things (convention) lesser the chances of messing things up.

期待你的建议,如果可能的经验。我主要关注的是可维护性和易部署性。

Looking forward at your suggestions and if possible experiences. My main concern is maintainability and ease of deployment.

推荐答案

我用 Ninject 和的 StructureMap - 都允许接线的配置,而无需XML。

I use Ninject and StructureMap -- both allow you to wire up your configuration without XML.

为了不被无耻地促进我的网站,但我写的教程使用Ninject提供<一href="http://frickinsweet.com/ryanlanciaux.com/post/Real-Ultimate-Power--Dependency-Injection-with-Ninject.aspx"相对=nofollow>这里。

Not to be shamelessly promoting my site but I wrote a tutorial on using Ninject available here.

这篇关于是否有一个.NET的IoC是prefers约定优于配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆