且构网

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

如何使用Ninject将参数传递到依赖关系链

更新时间:2023-11-19 13:34:46

Yannick的答案是好的,但是,这里有一个替代方法:创建 IAccountService 具有查找和返回AccountId的逻辑。然后将该服务注入到您的 IPhotoService

Yannick's answer is a good, however, here's an alternative: create an IAccountService that has the logic to find and return the AccountId. Then inject that service into your IPhotoService.