Author: Scott Hanselman - ASP.NET | Posted on: 9/4/2012 6:32:23 AM | Views : 1404

I was trying to write a blog post about something totally different and was using this small EntityFramework 5 Code First model: public class TouristAttraction { public int TouristAttractionId { get; set; } public string Name { get; set; } public DbGeography Location { get; set; } } You'll notice I'm using the DbGeography spatial type with Latitude and Longitude. This support is new in Entity Framework 5. For a more complex example I might want to make a custom type of my own or split things up into a double lat and double long, but for this little app I just wanted a few fields and a map. However, when I scaffolding things out, of course, DbGeography was left in the cold. It wasn't scaffolded or included. When I added a map, there...(read more) Go to the complete details ...