This topic is applicable to Entity Framework v5 and v6. For Entity Framework Core, see Spatial Data Support for EF Core.
When creating DbGeometry / DbGeography using such static methods as FromText(String), FromBinary(Byte[]), FromGml(String), the default SRID values are used.
User can set these default values with the GeometryDefaultSrid and GeographyDefaultSrid settings.
Alternatively, you may specify the default SRID values in the project config file. For this, you need to update or add the configSections element like it is described in the Entity Framework Provider Configuration section and then add the following Devart.Data.Oracle.Entity tag to the configuration tag:
<Devart.Data.Oracle.Entity xmlns="http://devart.com/schemas/Devart.Data.Oracle.Entity/1.0"> <SpatialOptions GeometryDefaultSrid="0" GeographyDefaultSrid="4326" /> </Devart.Data.Oracle.Entity>
Note: If you need to set multiple Entity Framework provider options for dotConnect for Oracle, don't add multiple Devart.Data.Oracle.Entity tags. Specify all settings in one Devart.Data.Oracle.Entity tag.
dotConnect for Oracle also provides the following additional settings that control the use of default SRID values:
Enabling these options may be useful for EWKT, NetTopologySuite, and SharpMap spatial services in case all the database objects have the same SRID value as it may increase performance of working with spatial data. It also reduces traffic a bit for all databases, which is useful when materializing a large number of spatial objects.
Choosing Spatial Service | Tolerance | Area and Distance Units | Spatials Comparison | Oracle Spatial Engine | Spatial Type Name Representation