.netcore遇到Unable to resolve service for type
作者:互联网
当遇到Unable to resolve service for type时,要考虑到接口方法是否已经注入:
例如:
Unable to resolve service for type 'SaasTestDemo.Application.Queries.IChannelQuery' while attempting to activate 'SaasTestDemo.API.Controllers.ChannelController'.
IChannelQuery没有注入到startup中,需添加:
又如Unable to resolve service for type 'SaasTestDemo.Application.Queries.IChannelQuery.IDbFactory。。。。。。
标签:resolve,service,IChannelQuery,netcore,SaasTestDemo,Unable,type 来源: https://www.cnblogs.com/dyxinfo/p/16490601.html