0
我想使用autofac和Repository Pattern(iRepository),但似乎无法看到使用XML配置配置autofac的方法。autofac open generic iRepository <T> xml配置
正如其他人遇到这个问题?
我想使用autofac和Repository Pattern(iRepository),但似乎无法看到使用XML配置配置autofac的方法。autofac open generic iRepository <T> xml配置
正如其他人遇到这个问题?
Autofac目前不支持通过XML配置注册开放式泛型。 XML配置机制很方便,但不是Autofac的完整1:1特性集(可能永远不会)。
处理更复杂配置的推荐方法是将XML configuration与Autofac modules结合使用。
我可以使用开放通用http://code.google.com/p/autofac/wiki/OpenGenerics中的示例并使用构建器,我想知道是否也可以启用xml配置开放的泛型,团队希望能够有这个要求。如果不可能,我们将为每个上下文/类型创建接口并继续。 – Vince