更新时间: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
.