我想注册具有多个构造函数的程序集类型自动装配选择了错误的构造函数并希望像在 RegisterType 中那样指定它
builder.RegisterType(typeof(IController))
.UsingConstructor(typeof(IUnitOfWork));
但是当我这样做时
builder.RegisterAssemblyTypes(typeof(IController).Assembly)
.UsingConstructor(typeof(IUnitOfWork));
我明白了
“'System.Object' 类型上不存在匹配的构造函数。”
我认为这是因为装配类型比我想象的要复杂一些,但问题仍然存在
我该怎么办?