首页 > 其他 > 详细

Unable to resolve service for type的问题

时间:2020-04-29 00:42:05      阅读:677      评论:0      收藏:0      [点我收藏+]

今天写了一个方法和接口,需要将接口通过依赖注入的方式注入到Controller里面,但是却出现了InvalidOperationException: Unable to resolve service for type ‘WebAPI.Services.IPropertyCheckerService‘ while attempting to activate ‘WebAPI.Controllers.CompaniesController‘.在网上搜了之后才发现,需要在StartUp的Service里面注册一下。

技术分享图片

 

Unable to resolve service for type的问题

原文:https://www.cnblogs.com/fanlin92/p/12798168.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!