Is there any way to manipulate the entity framework query.
I have a class that has a geometry column.
public class Geom
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Geometry { get; set; }
}
Database context is getting data from database.
using (var database = new DatabaseContext())
{
var items= database.Geoms;
}
This sends database an sql query like: "select id,name,geometry from geoms"
I want to change the query before send database like this:
"select id,name,ST_AsText(geometry) from geoms"
is this possible?
Because I am using postgresql database so can not use DbGeometry.