System.Data.Spatial DBGeography.Distance()是否可以与SQL Server 2008一起使用?

时间:2019-06-03 09:33:03

标签: c# .net sql-server-2008 linq-to-sql dbgeography

我正在使用 WARNING in Circular dependency detected: [ng] src/Components/chat/chat.component.ts -> src/Components/profile/profile.component.ts -> src/Components/chat/chat.component.ts [ng] WARNING in Circular dependency detected: [ng] src/Components/profile/profile.component.ts -> src/Components/chat/chat.component.ts -> src/Components/profile/profile.component.ts 使用LINQToSQL c#计算两个System.Data.Spatial.DBGeography.Distance()位置之间的距离。我确认这可以在SQL Server 2012中使用。我可以在SQL Server 2008中使用它吗?

提前谢谢!

1 个答案:

答案 0 :(得分:0)

SQL Server中System.Data.Spatial.DBGeography.Distance()的等效方法是Geography.STDistance()。 我已经在SQL Server 2008中测试了STDistance方法,效果很好。

所有人,谢谢您的答复!