我有父类动物和两个孩子类狗和猫。我正在使用Autofac进行依赖注入。我想根据配置文件中指定的条件注册Dog和Cat。 我想在我的模块类下面的代码。 If Dog mentioned in Config file then builder.RegisterType<Dog>().As<Animal>().PropertiesAutowired().SingleInstance(); If cat
我通过autofac 模块将该层连接在一起。非常感谢endeffects。 Here is the HowTo 现在我试图使连接字符串在DAL层可用。我试图注册: Configuration (Microsoft.Extensions.Configuration)
从启动类,但没有成功。 我们的帮助将不胜感激,谢谢斯特凡