Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }
Exemple #5
0
        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);
        }
Exemple #6
0
        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);
        }
Exemple #7
0
        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);
        }
Exemple #8
0
        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);
        }
Exemple #9
0
        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);
        }
Exemple #10
0
        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);
        }
Exemple #11
0
        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);
        }