DbSpatialServices.Distance Method (DbGeography, DbGeography)
.NET Framework 4.5
Computes the distance between the closest points in two DbGeography values.
Namespace: System.Data.Spatial
Assembly: System.Data.Entity (in System.Data.Entity.dll)
Parameters
- geographyValue
- Type: System.Data.Spatial.DbGeography
The first geography value.
- otherGeography
- Type: System.Data.Spatial.DbGeography
The second geography value.
Return Value
Type: System.DoubleA double value that specifies the distance between the two closest points in geographyValue and otherGeography.
| Exception | Condition |
|---|---|
| ArgumentNullException | geographyValue otherGeography |
| ArgumentException | geographyValue otherGeography |
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.