score:3
Accepted answer
while not a sql answer, i always recommend this explanation for how to calculate distances between lat-lng - http://www.movable-type.co.uk/scripts/latlong.html
for sql server, assuming you are using sql server 2008, then you can use the native sql geography types. however, sadly i don't think these map well to linq-2-sql so you will probably need to wrap them within stored procedures.
see:
- getting started with geo types - http://msdn.microsoft.com/en-us/library/bb895266.aspx
- determining relationships (which includes stdistance) - http://msdn.microsoft.com/en-us/library/bb964709.aspx
Source: stackoverflow.com
Related Query
- LINQ Source Code Available
- creating Linq to sqlite dbml from DbLinq source code
- LINQ POI proximity
- source code for LINQ 101 samples
- c# Linq or code to extract groups from a single list of source data
- Convert string[] to int[] in one line of code using LINQ
- Code equivalent to the 'let' keyword in chained LINQ extension method calls
- Linq code to select one item
- How are people unit testing code that uses Linq to SQL
- LINQ query to perform a projection, skipping or wrapping exceptions where source throws on IEnumerable.GetNext()
- Syntax to execute code block inside Linq query?
- Enumerable.Empty<T>().AsQueryable(); This method supports the LINQ to Entities infrastructure and is not intended to be used directly from your code
- Best open source LINQ provider
- Is there a good source that gives an overview of linq optimizations?
- Does this LINQ code perform multiple lookups on the original data?
- How to understand the following C# linq code of implementing the algorithm to return all combinations of k elements from n
- LINQ WHERE method alters source collection
- Where can I view LINQ source code?
- Suggestions for designing complex LINQ code
- Is there any way to create a LINQ query as a variable without having the data source (yet)?
- Left outer join using LINQ -- understanding the code
- How to pass LinQ Expressions from F# to C# code
- How to reuse a linq expression for 'Where' when using multiple source tables
- Avoiding code repetition when using LINQ
- Using LINQ to delete an element from a ObservableCollection Source
- How does linq actually execute the code to retrieve data from the data source?
- How can I switch that code to use LINQ
- How does this linq code that splits a sequence work?
- multiple orderby in this linq code
- How can I combine this code into one or two LINQ queries?
More Query from same tag
- LINQ - sum of column in hierarchical data
- Build LINQ query in a loop
- Marking possible duplicates as distinct
- Join two lists returns IEnumerable in IEnumerable C# Entity framework
- how to write conditional query from two tables using LINQ
- Linq Sort Nested Table
- create master detail with linq for devexpress grid control
- Pass linq to entities query as parameter and execute against different objects
- Map one dictionary to another using Linq
- How to rewrite this LINQ query with SQL syntax and <>?
- How to edit DataGridView and send change back to Entity (LINQ)
- Creating a new list by incrementing two separate lists
- How to write this in Linq? group and get max
- selectList razor tag helpers asp.netCore
- How to add Timestamp value in SQL database by using LINQ
- LINQ to Entities can't compile a store expression
- Get ParentNode and ChildNodes from XML with LINQ
- Random Name Picker
- Sort a list of strings which contains float numbers
- Building an object list with Linq to Xml
- C# Converting List to Enumerable and Selecting With LINQ
- Select distinct data on query
- Is looping through the entityreference the correct way?
- how to get sum of columns in nhibernate linq
- Statement lambda in Any(LINQ)
- I need a LINQ expression to find an XElement where the element name and attributes match an input node
- Reconciling a new BindingList into a master BindingList using LINQ
- C# LINQ join 3 tables with outer join
- Calling a Method inside LINQ
- linq to sql select inside an inner join