public class City
{
public int Id { get; set; }
public string Name { get; set; }
public Geometry Location { get; set; }
}
Тип моей сущности City
имеет свойство Geometry
. Я получаю данные вроде следующего:
public class CitiesController {
public Task<IActionResult> Get(){
var nearbyCities = context.Cities
.Where(c => c.Location.Distance(somePoint) < 100);
response OK(??? geojson string ???);
}
}
Итак, я хочу, как я могу получить строку Geo json, используя Npg sql или Nettopologysuite?