Skip to content

Instantly share code, notes, and snippets.

@SBajonczak
Created January 4, 2022 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SBajonczak/21a653693348f0972cba7ffc4f9ef32f to your computer and use it in GitHub Desktop.
Save SBajonczak/21a653693348f0972cba7ffc4f9ef32f to your computer and use it in GitHub Desktop.
Creating Spatial Demo Data
// Create first data entry
City seattle = new City();
seattle.CityName = "Seattle";
seattle.Location = new Point(-122.333056, 47.609722) { SRID = 4326 };
ctx.Cities.Add(seattle);
// Create second data entry
City redmond = new City();
redmond.CityName = "Redmond";
redmond.Location = new Point(-122.123889, 47.669444) { SRID = 4326 };
ctx.Cities.Add(redmond);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment