版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yangyikun0428/article/details/80331898
问题:
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>();