Get a location, save it to a DB, search against it

David Thielen 2,231 Reputation points

Hi all;

This is a 4 part question that I think crosses several parts. Here goes. I need to do the following:

  1. Feed in an entered address and get back the correct address (or a "can't find it".
  2. From that address get the location of that address.
  3. Save that location using EntityFrameworks into the underlying SQL Database.
  4. Search the database for all users within N miles of a specified location.

I've found a ton of stuff on this searching the web - none of which works. I can't even find a class to store the location that I can find a matching library for. So help please.

thanks - dave

Microsoft Technologies based on the .NET software framework.
3,346 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce ( 55,041 Reputation points
    1. to standardize and verify address, you will need to subscribe to a service or buy a database (with updates) to do this.
    2. be sure to pick a vendor that supplies the geo location of the address
    3. use spatial datatype. see:

    1. use the STDistance to calc distance. see above docs