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

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

迁库的时候报错

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

猜你喜欢

转载自www.cnblogs.com/Lulus/p/10417518.html
今日推荐