Abp.vnext 项目初始化数据库
今天想学一下Abp.vnext 框架,然后就使用Abp创建了一个项目,在运行项目遇到了几个问题。
- 初始化数据库,xxx.xxx.DbMigratorm 运行成功,但没有初始化数据库。
解决办法:检查 xxx.xxx.DbMigratorm 是否安装了Microsoft.EntityFrameworkCore.Design包,如果没有,找到对应的版本安装(如果版本不对,也有可能出错) - xxx.xxx.DbMigratorm 运行报错 “ A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - 证书链是由不受信任的颁发机构颁发的。)”
解决办法:在连接字符串尾部加入Encrypt=True;Trusted_Connection=True;或者TrustServerCertificate=True;