ABP asp.net core 切换到postgresql 数据库
1、我使用的vue版本的abp框架,首先需要在Entityframwork core和web.host 项目里面安装如下文件

安装少了一个都不行,否则会出现莫名其妙的错误
2、修改entityframworkCore这个项目中修改后缀为contextConfigurater类,使用npgsql数据库

3、修改数据库连接地址:
"ConnectionStrings": {
"Default": "Host=host;Port=5432;Database=SmartSystem66;User ID=postgres;Password=88888"
},
4、迁移之前删除migrator项目下面的migrations文件夹,从新生成数据库迁移文件,让后选中entityframwork 项目执行
add-migration xxx
update-database
posted on 2021-09-01 16:37 topguntopgun 阅读(276) 评论(0) 收藏 举报
浙公网安备 33010602011771号