.net core InvalidOperationException: Unable to resolve service for type while attempting to activate

问题:

InvalidOperationException: Unable to resolve service for type 'WebApplication3.Models.SysUserDB' while attempting to activate 'WebApplication3.Controllers.SysUsersController'.

解决办法:

Startup.cs

ConfigureServices方法内添加

services.AddTransient<WebApplication3.Models.SysUserDB>();

上一篇:[转]com.atlassian.greenhopper.service.issue.flagging


下一篇:Xcode升级13之后, cocoapods命令报错