コード例 #1
0
        internal object ConvertToSqlTypesGeography(DbGeography geographyValue)
        {
            geographyValue.CheckNull("geographyValue");
            object result = GetSqlTypesSpatialValue(geographyValue.AsSpatialValue(), SqlGeographyType);

            return(result);
        }
コード例 #2
0
        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);
        }