public override DbGeography GeographyFromProviderValue(object providerValue)
        {
            providerValue.CheckNull("providerValue");
            object normalizedProviderValue = NormalizeProviderValue(providerValue, this.SqlTypes.SqlGeographyType);

            return(this.SqlTypes.IsSqlGeographyNull(normalizedProviderValue) ? null: DbSpatialServices.CreateGeography(this, normalizedProviderValue));
        }
 public override DbGeography GeographyFromProviderValue(object providerValue)
 {
     return
         (providerValue == null || ((dynamic)providerValue).IsNull ?
          null :
          DbSpatialServices.CreateGeography(this, providerValue));
 }
Beispiel #3
0
        public override DbGeography GeographyFromText(string geographyText)
        {
            geographyText.CheckNull("geographyText");
            ReadOnlySpatialValues backingValue = new ReadOnlySpatialValues(DbGeography.DefaultCoordinateSystemId, textValue: geographyText, binaryValue: null, gmlValue: null);

            return(DbSpatialServices.CreateGeography(this, backingValue));
        }
Beispiel #4
0
        public override DbGeography GeographyFromGml(string geographyMarkup, int spatialReferenceSystemId)
        {
            geographyMarkup.CheckNull("geographyMarkup");
            ReadOnlySpatialValues backingValue = new ReadOnlySpatialValues(spatialReferenceSystemId, textValue: null, binaryValue: null, gmlValue: geographyMarkup);

            return(DbSpatialServices.CreateGeography(this, backingValue));
        }
Beispiel #5
0
        public override DbGeography GeographyFromBinary(byte[] geographyBinary, int spatialReferenceSystemId)
        {
            geographyBinary.CheckNull("geographyBinary");
            ReadOnlySpatialValues backingValue = new ReadOnlySpatialValues(spatialReferenceSystemId, textValue: null, binaryValue: geographyBinary, gmlValue: null);

            return(DbSpatialServices.CreateGeography(this, backingValue));
        }
Beispiel #6
0
 public override DbGeography GeographyFromBinary(
     byte[] geographyBinary,
     int spatialReferenceSystemId)
 {
     Check.NotNull <byte[]>(geographyBinary, nameof(geographyBinary));
     return(DbSpatialServices.CreateGeography((DbSpatialServices)this, (object)new DefaultSpatialServices.ReadOnlySpatialValues(spatialReferenceSystemId, (string)null, geographyBinary, (string)null)));
 }
Beispiel #7
0
 public override DbGeography GeographyFromGml(
     string geographyMarkup,
     int spatialReferenceSystemId)
 {
     Check.NotNull <string>(geographyMarkup, nameof(geographyMarkup));
     return(DbSpatialServices.CreateGeography((DbSpatialServices)this, (object)new DefaultSpatialServices.ReadOnlySpatialValues(spatialReferenceSystemId, (string)null, (byte[])null, geographyMarkup)));
 }
Beispiel #8
0
 public override DbGeography GeographyFromProviderValue(object providerValue)
 {
     Check.NotNull <object>(providerValue, nameof(providerValue));
     return(DbSpatialServices.CreateGeography((DbSpatialServices)this, (object)DefaultSpatialServices.CheckProviderValue(providerValue)));
 }
Beispiel #9
0
 public override DbGeography GeographyFromText(string geographyText)
 {
     Check.NotNull <string>(geographyText, nameof(geographyText));
     return(DbSpatialServices.CreateGeography((DbSpatialServices)this, (object)new DefaultSpatialServices.ReadOnlySpatialValues(DbGeography.DefaultCoordinateSystemId, geographyText, (byte[])null, (string)null)));
 }