共用方式為


DbSpatialServices.AsText 方法 (DbGeography)

[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]

取得所指 DbGeography 值的已知文字表示法。 此值應該只包含點的經度和緯度。

命名空間:  System.Data.Entity.Spatial
組件:  EntityFramework (在 EntityFramework.dll 中)

語法

'宣告
Public MustOverride Function AsText ( _
    geographyValue As DbGeography _
) As String
'用途
Dim instance As DbSpatialServices 
Dim geographyValue As DbGeography 
Dim returnValue As String 

returnValue = instance.AsText(geographyValue)
public abstract string AsText(
    DbGeography geographyValue
)
public:
virtual String^ AsText(
    DbGeography^ geographyValue
) abstract
abstract AsText : 
        geographyValue:DbGeography -> string
public abstract function AsText(
    geographyValue : DbGeography
) : String

參數

傳回值

類型:System.String
包含 geographyValue 的已知文字表示法的字串。

例外狀況

例外狀況 條件
ArgumentNullException

geographyValue 為 null。

ArgumentException

geographyValue 與此空間服務實作不相容。

請參閱

參考

DbSpatialServices 類別

AsText 多載

System.Data.Entity.Spatial 命名空間