How to define 'geography' type using Npgsql and OrmLite (using postgresql, postgis, c#)
问题 How do I define a postgis 'geography' type in my C# class model so that OrmLite can easily pass it through to Postgresql so I can run spatial queries in addition to saving spatial data to the 'geography' column? 回答1: The best library is NetTopologySuite for this case; you can use like this; protected GisSharpBlog.NetTopologySuite.Geometries.Geometry _geom; public GisSharpBlog.NetTopologySuite.Geometries.Geometry Geom { get { return _geom; } set { _geom = value; } } protected string _geomwkt;