postgresql && .net core 使用空间数据

这里主要讲遇到的一些报错
增删改查 && 计算部分基本和sql server的空间数据操作一毛一样,感谢微软大大的倾情支持,直接看demo即可(~ ̄▽ ̄)~
前往sql server & .net core 使用空间数据

引用库
Npgsql.EntityFrameworkCore.PostgreSQL
Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite
迁库的时候报错
could not open extension control file ".../PostgreSQL/version/share/extension/postgis.control": No such file or directory

下载postgis,并安装,解决这个问题
报错

could not load library ".../postgis-2.5.dll": %1 is not a valid Win32 application.

在 \PostgreSQL\version\bin目录下,将libxml2-2.dll替换成libxml2.dll,即libxml2.dll和libxml2-2.dll都是原来的libxml2.dll文件
参考资料
https://stackoverflow.com/questions/16828383/postgis-database-installation-of-functions-failed
https://blog.csdn.net/xinshijimanon/article/details/80521947

示例代码

https://github.com/zLulus/NotePractice/blob/dev3/Console/CodeLibraryForDotNetCore/UsePostgresql/PostgresqlUseGeometryDemo.cs

参考资料

https://www.npgsql.org/efcore/mapping/nts.html

转载于:https://www.cnblogs.com/Lulus/p/10417518.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值