What is wrong with that??
const string lonMin="-19";
const string latMin = "25";
const string lonMax = "-24";
const string latMax = "25.6";
//Create a polygon
var geoEncuadre = DbGeography.FromText("POLYGON ((" + lonMin + " " + latMin + "," +
lonMax + " " + latMin + ","+ lonMax + " "+ latMax +","+lonMin+" " + latMax +","+lonMin + " "+latMin + "))", 4326);
//Check for every node if intersects with the polygon
var nodos = (from n in _bd.Nodo
where n.Geo.Intersects(geoEncuadre)
select n).ToList();
This throws an EntityCommandExecutionException
. It´s weird because if I use DbGeometry instead DbGeography it works fine.
What happen with the DbGeography and the Intersect operation?