public class City
{
public int Id { get; set; }
public string Name { get; set; }
public Geometry Location { get; set; }
}
My entity framework entity City
type has a Geometry
property. I am getting data like following:
public class CitiesController {
public Task<IActionResult> Get(){
var nearbyCities = context.Cities
.Where(c => c.Location.Distance(somePoint) < 100);
response OK(??? geojson string ???);
}
}
So I want how can I get Geojson string using Npgsql or Nettopologysuite?