static async Task SetAsia() { var asa = new Models.Locations() { Code = "AS", Description = "Asia", LocationId = 10 }; asa.SetLocation(97.522257, 56.069107); asa.SetArea(GetAsiaPoligon()); await ctx.Locations.InsertOneAsync(asa); }
static async Task SetAustralia() { var aus = new Models.Locations() { Code = "AUS", Description = "Australia", LocationId = 11 }; aus.SetLocation(133.733195, -25.010726); aus.SetArea(GetAustraliaPoligon()); await ctx.Locations.InsertOneAsync(aus); }
static async Task SetEurope() { var eu = new Models.Locations() { Code = "EU", Description = "Europe", LocationId = 9 }; eu.SetLocation(13.147258, 49.947844); eu.SetArea(GetEuropePoligon()); await ctx.Locations.InsertOneAsync(eu); }
static async Task SetAfrica() { var afc = new Models.Locations() { Code = "AFC", Description = "Africa", LocationId = 8 }; afc.SetLocation(19.475383, 13.063667); afc.SetArea(GetAfricaPoligon()); await ctx.Locations.InsertOneAsync(afc); }
static async Task SetSouthAmerica() { var sa = new Models.Locations() { Code = "SA", Description = "South America", LocationId = 7 }; sa.SetLocation(-60.328704, -16.809748); sa.SetArea(GetSouthAmericaPoligon()); await ctx.Locations.InsertOneAsync(sa); }
static async Task SetBarcelonaLocations() { var bcn = new Models.Locations() { Code = "BCN", Description = "Barcelona", LocationId = 6 }; bcn.SetLocation(2.156453, 41.395226); bcn.SetArea(GetBarcelonaPoligon()); await ctx.Locations.InsertOneAsync(bcn); }
static async Task SetSeattleLocations(string parentId) { var stl = new Models.Locations() { Parent_Id = parentId, Code = "SEAT", Description = "Seattle", LocationId = 4 }; stl.SetArea(GetSeattlePoligon()); stl.SetLocation(-122.330747, 47.603111); await ctx.Locations.InsertOneAsync(stl); }
static async Task SetRedmondLocations(string parentId) { var rdm = new Models.Locations() { Parent_Id = parentId, Code = "REDM", Description = "Redmond", LocationId = 5 }; rdm.SetLocation(-122.122887, 47.674961); rdm.SetArea(GetRedmondPoligon()); await ctx.Locations.InsertOneAsync(rdm); }
static async Task SetNorthAmerica() { var us = new Models.Locations() { Code = "NA", Description = "North America", LocationId = 1 }; us.SetLocation(-103.219329, 48.803281); us.SetArea(GetNorthAmericaPoligon()); await ctx.Locations.InsertOneAsync(us); await SetUSLocations(us.Id); }
static async Task SetUSLocations(string parentId) { var us = new Models.Locations() { Parent_Id = parentId, Code = "US", Description = "United States", LocationId = 2 }; us.SetLocation(-101.357386, 41.650455); us.SetArea(GetUSPoligon()); await ctx.Locations.InsertOneAsync(us); await SetWashingtonLocations(us.Id); }
static async Task SetWashingtonLocations(string parentId) { var wht = new Models.Locations() { Parent_Id = parentId, Code = "WHT", Description = "Washington", LocationId = 3 }; wht.SetLocation(-119.542781, 47.223652); wht.SetArea(GetWashingtonPoligon()); await ctx.Locations.InsertOneAsync(wht); await SetSeattleLocations(wht.Id); await SetRedmondLocations(wht.Id); }