其他分享
首页 > 其他分享> > .net core InvalidOperationException: Unable to resolve service for type while attempting to activate

.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>();

标签:WebApplication3,core,resolve,service,attempting,Unable,activate,InvalidOperation
来源: https://www.cnblogs.com/simadi/p/15400945.html