dotnet核心数据库首先使用NetTopologySuite

Jan*_*kke 9 c# postgresql nettopologysuite .net-core

我最近升级到EntityFrameworkCore.PostgreSQL的最新版本,但空间数据似乎不起作用,因为他们现在使用NetTopologySuite看到这里

要设置NetTopologySuite插件,请将Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite nuget添加到项目中.然后,对UseNpgsql()行进行以下修改:

我用这个dotnet ef dbcontext scaffold命令

dotnet ef dbcontext scaffold "MyConnectionString" Npgsql.EntityFrameworkCore.PostgreSQL
Run Code Online (Sandbox Code Playgroud)

但是,该scaffold命令似乎没有使用NetTopologySuite映射.我仍然收到以下错误

Could not find type mapping for column 'public.behaviour.coord' with data type 'geometry(Point)'. Skipping column.
Run Code Online (Sandbox Code Playgroud)

如何使用NetTopologySuite构建我的数据库

sia*_*sty 0

我遇到了类似的问题,更新 postgre 库后,我必须删除迁移文件并重新生成新文件