geospatial

Entity Framework Core 3.1 with NetTopologySuite.Geometries.Point: SqlException: The supplied value is not a valid instance of data type geography

*爱你&永不变心* 提交于 2020-07-09 04:37:27
问题 I have a model that looks like this: public class Facility { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; } public NetTopologySuite.Geometries.Point Location { get; set; } } Test code for adding a Point: var testFacility = new Facility(); testFacility.Location = new NetTopologySuite.Geometries.Point(13.003725d, 55.604870d) { SRID = 3857 }; //Other values tested with the same error error //testFacility.Location = new NetTopologySuite.Geometries.Point(13