且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

带有Web Api控制器的Autofac

更新时间:2023-02-12 16:07:31

该错误消息表示您的控制器具有某些依赖关系,Autofac不知道该依赖关系如何为您注入它们.换句话说,控制器的构造函数具有一些需要注入的依赖项(参数),但是这些依赖项(服务)本身尚未在Autofac中注册.

The error message means that your controller has some dependencies that Autofac doesn't know how to inject them for you. In other words, your controller's constructor has some dependencies (parameters) that needs to be injected but those dependencies (services) themselves haven't been registered in Autofac.

如果您共享控制器的构造函数代码,我们将能够为您识别那些未注册的依赖项.

If you share your controller's constructor code we would be able to identify those unregistered dependencies for you.