本文介绍了AddDbContext中缺少UseSqlServer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
只需升级到asp core 2.1, AddDbContext 的选项中似乎不再存在 UseSqlServer
Just upgraded to asp core 2.1 and it seems like UseSqlServer no longer exists in the options for AddDbContext. (where I pass in the connectionstring)
我应该用什么代替?
推荐答案添加了nuget包 Microsoft.EntityFrameworkCore.SqlServer ,并且再次起作用
Added nuget package Microsoft.EntityFrameworkCore.SqlServer and it worked again
更多推荐
AddDbContext中缺少UseSqlServer
发布评论