使用 Linq to Sql 查找半径距离内的邮政编码
我有一个邮政编码及其纬度/经度的数据库表。我试图找到一些代码,显示一个查询,该查询采用邮政编码和 x 英里,然后返回包含该半径内所有邮政编码的结果集(精度不是很重要 - 只要接近即可)。
是否可以通过 Linq to SQL 查询来完成此操作,这样我就不必使用存储过程?
I have a database table of zipcodes with their Lat/Longs. I'm trying to find some code that shows a query that takes a zipcode and x miles and then return set of results that include all the zipcodes that are within that radius (precision is not very important - as long as it's close).
Can this be done with a Linq to SQL query so I don't have to use a Stored Procedure?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想通了,一旦我找到了方程,实际上并没有那么难。
I figured it out and it actually wasn't all that hard once i found the equation.