Spatial not working when using Context.Database.SqlQuery<>
Posted: Thu 13 Oct 2016 14:15
Hi,
Query:
I have tried try1 and try2 variants. Both are throwing exception:
Spatials works ok when using EntityFramework calls.
dotConnect version: 9.1.97.0
Query:
Code: Select all
return Context.Database.SqlQuery<Entity>(
"SELECT
t.geom AS Geom_try1
(
CASE WHEN t.geom IS NULL THEN
NULL
ELSE
'SRID=' || NVL(t.geom.SDO_SRID, '0') || ';' || SDO_UTIL.TO_WKTGEOMETRY(t.geom)
END
) AS Geom_try2
...
);
dotConnect configuration:System.Data.Entity.Core.ProviderIncompatibleException : The provider did not return a 'DbSpatialServices' instance. In order to use the 'DbGeography' or 'DbGeometry' spatial types the EF provider being used must support spatial types and all prerequisites for the provider must be installed. See http://go.microsoft.com/fwlink/?LinkId=287183 for details.
Code: Select all
config.SpatialOptions.SpatialServiceType = SpatialServiceType.NetTopologySuite;
dotConnect version: 9.1.97.0