找不到适合实体类型“CoordinateSystem”的构造函数

问题描述

我正在尝试生成一个包含空间列的迁移文件(几何) 我收到这个错误

未找到适合实体类型“CoordinateSystem”的构造函数。以下构造函数的参数无法绑定到实体类型的属性:无法绑定 'epsgId','topology' in 'CoordinateSystem(int epsgId,string name,Topology topology)'。

是不是因为 sql 不支持空间数据?

我尝试添加数据库的模型:

public class polygon
{
    public int Id { set; get; }
    public int AreaId { set; get; }
    [ForeignKey("AreaId")]
    public virtual Area Area { get; set; }
    public Geometry Border { get; set; }
    [Column(TypeName = "nvarchar(7)")]
    public string Color { get; set; }
    public DateTime SelectDate { get; set; }
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)