Exemple #1
0
        internal object ConvertToSqlTypesGeography(DbGeography geographyValue)
        {
            DebugCheck.NotNull(geographyValue);
            var result = GetSqlTypesSpatialValue(geographyValue.AsSpatialValue(), SqlGeographyType);

            return(result);
        }
Exemple #2
0
        internal object ConvertToSqlTypesGeography(DbGeography geographyValue)
        {
            geographyValue.CheckNull("geographyValue");
            object result = GetSqlTypesSpatialValue(geographyValue.AsSpatialValue(), SqlGeographyType);

            return(result);
        }
        public override DbGeographyWellKnownValue CreateWellKnownValue(DbGeography geographyValue)
        {
            geographyValue.CheckNull("geographyValue");
            var spatialValue = geographyValue.AsSpatialValue();

            DbGeographyWellKnownValue result = CreateWellKnownValue(spatialValue,
                                                                    () => SpatialExceptions.CouldNotCreateWellKnownGeographyValueNoSrid("geographyValue"),
                                                                    () => SpatialExceptions.CouldNotCreateWellKnownGeographyValueNoWkbOrWkt("geographyValue"),
                                                                    (srid, wkb, wkt) => new DbGeographyWellKnownValue()
            {
                CoordinateSystemId = srid, WellKnownBinary = wkb, WellKnownText = wkt
            });

            return(result);
        }