简体   繁体   English

autofac打开通用iRepository <T> xml配置

[英]autofac open generic iRepository<T> xml configuration

I would like to use autofac and the Repository Pattern (iRepository) but can't seem to see a way to configure autofac using XML configuration. 我想使用autofac和存储库模式(iRepository),但似乎看不到使用XML配置来配置autofac的方法。

As anyone else come across this issue? 还有其他人遇到这个问题吗?

Autofac does not currently have support for registering open generics via XML configuration. Autofac当前不支持通过XML配置注册开放的泛型。 The XML configuration mechanism is handy, but is not a complete 1:1 featureset of Autofac (and it probably never will be). XML配置机制很方便,但不是Autofac的完整1:1功能集(可能永远不会)。

The recommended way to handle more complex configuration is to use XML configuration in combination with Autofac modules . 建议的处理更复杂配置的方法是将XML配置Autofac模块结合使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM