public TourManagementRepository(TourManagementContext context)
 {
     _context = context;
 }
        public static void EnsureSeedDataForContext(this TourManagementContext context)
        {
            // first, clear the database.  This ensures we can always start
            // fresh with each demo.  Not advised for production environments, obviously :-)

            context.Tours.RemoveRange(context.Tours);
            context.Bands.RemoveRange(context.Bands);
            context.Managers.RemoveRange(context.Managers);

            context.SaveChanges();

            // init seed data
            var managers = new List <Manager>()
            {
                new Manager()
                {
                    ManagerId = 1,
                    Name      = "Kevin",
                    CreatedBy = "system",
                    CreatedOn = DateTime.UtcNow
                },
                new Manager()
                {
                    ManagerId = 2,
                    Name      = "Sven",
                    CreatedBy = "system",
                    CreatedOn = DateTime.UtcNow
                }
            };

            var bands = new List <Band>()
            {
                new Band()
                {
                    BandId    = 1,
                    Name      = "Queens of the Stone Age",
                    CreatedBy = "system",
                    CreatedOn = DateTime.UtcNow
                },
                new Band()
                {
                    BandId    = 2,
                    Name      = "Nick Cave and the Bad Seeds",
                    CreatedBy = "system",
                    CreatedOn = DateTime.UtcNow
                }
            };

            var tours = new List <Tour>()
            {
                new Tour()
                {
                    TourId           = 1,
                    BandId           = 1,
                    ManagerId        = 1,
                    Title            = "Villains World Tour",
                    Description      = "The Villains World Tour is a concert tour in support of the band's seventh studio album, Villains.",
                    StartDate        = new DateTimeOffset(2017, 6, 22, 0, 0, 0, new TimeSpan()),
                    EndDate          = new DateTimeOffset(2018, 3, 18, 0, 0, 0, new TimeSpan()),
                    EstimatedProfits = 2500000,
                    CreatedBy        = "system",
                    CreatedOn        = DateTime.UtcNow,
                    Shows            = new List <Show>()
                    {
                        new Show()
                        {
                            Venue     = "The Rapids Theatre",
                            City      = "Niagara Falls",
                            Country   = "United States",
                            Date      = new DateTimeOffset(2017, 6, 22, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Marina de Montebello",
                            City      = "Montebello",
                            Country   = "Canada",
                            Date      = new DateTimeOffset(2017, 6, 24, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Ventura Theatre",
                            City      = "Venture",
                            Country   = "United States",
                            Date      = new DateTimeOffset(2017, 8, 10, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Golden Gate Park",
                            City      = "San Francisco",
                            Country   = "United States",
                            Date      = new DateTimeOffset(2017, 8, 12, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Capitol Theatre",
                            City      = "Port Chester",
                            Country   = "United States",
                            Date      = new DateTimeOffset(2017, 9, 6, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Festival Pier",
                            City      = "Philadelphia",
                            Country   = "United States",
                            Date      = new DateTimeOffset(2017, 9, 7, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Budweiser Stage",
                            City      = "Toronto",
                            Country   = "Canada",
                            Date      = new DateTimeOffset(2017, 9, 9, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        }
                    }
                },
                new Tour()
                {
                    TourId           = 2,
                    BandId           = 2,
                    ManagerId        = 2,
                    Title            = "Skeleton Tree European Tour",
                    Description      = "Nick Cave and The Bad Seeds have announced an 8-week European tour kicking off in the UK at Bournemouth’s International Centre on 24th September. The tour will be the first time European audiences can experience live songs from new album Skeleton Tree alongside other Nick Cave & The Bad Seeds classics.  The touring line up features Nick Cave, Warren Ellis, Martyn Casey, Thomas Wydler, Jim Sclavunos, Conway Savage, George Vjestica and Larry Mullins.",
                    StartDate        = new DateTimeOffset(2017, 9, 24, 0, 0, 0, new TimeSpan()),
                    EndDate          = new DateTimeOffset(2017, 11, 20, 0, 0, 0, new TimeSpan()),
                    EstimatedProfits = 1200000,
                    CreatedBy        = "system",
                    CreatedOn        = DateTime.UtcNow,
                    Shows            = new List <Show>()
                    {
                        new Show()
                        {
                            Venue     = "Bournemouth International Centre",
                            City      = "Bournemouth",
                            Country   = "United Kingdom",
                            Date      = new DateTimeOffset(2017, 9, 24, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Arena",
                            City      = "Manchester",
                            Country   = "United Kingdom",
                            Date      = new DateTimeOffset(2017, 9, 25, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "The SSE Hydro",
                            City      = "Glasgow",
                            Country   = "United Kingdom",
                            Date      = new DateTimeOffset(2017, 9, 27, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Motorpoint Arena",
                            City      = "Nottingham",
                            Country   = "United Kingdom",
                            Date      = new DateTimeOffset(2017, 9, 28, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "The O2",
                            City      = "London",
                            Country   = "United Kingdom",
                            Date      = new DateTimeOffset(2017, 9, 30, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Zénith",
                            City      = "Paris",
                            Country   = "France",
                            Date      = new DateTimeOffset(2017, 10, 3, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Ziggo Dome",
                            City      = "Amsterdam",
                            Country   = "The Netherlands",
                            Date      = new DateTimeOffset(2017, 10, 6, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Jahrhunderthalle",
                            City      = "Frankfurt",
                            Country   = "Germany",
                            Date      = new DateTimeOffset(2017, 10, 7, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Sporthalle",
                            City      = "Hamburg",
                            Country   = "Germany",
                            Date      = new DateTimeOffset(2017, 10, 9, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Rockhal",
                            City      = "Luxembourg",
                            Country   = "Luxembourg",
                            Date      = new DateTimeOffset(2017, 10, 10, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Mitsubishi Electric Halle",
                            City      = "Düsseldorf",
                            Country   = "Germany",
                            Date      = new DateTimeOffset(2017, 10, 10, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Sportpaleis",
                            City      = "Antwerp",
                            Country   = "Belgium",
                            Date      = new DateTimeOffset(2017, 10, 13, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        }
                    }
                }
            };

            context.Managers.AddRange(managers);
            context.Bands.AddRange(bands);
            context.Tours.AddRange(tours);

            context.SaveChanges();
        }
Example #3
0
        public static void EnsureSeedDataForContext(this TourManagementContext context)
        {
            // first, clear the database.  This ensures we can always start
            // fresh with each demo.  Not advised for production environments, obviously :-)

            context.Shows.RemoveRange(context.Shows);
            context.Tours.RemoveRange(context.Tours);
            context.Bands.RemoveRange(context.Bands);
            context.Managers.RemoveRange(context.Managers);
            context.Orders.RemoveRange(context.Orders);
            context.Customers.RemoveRange(context.Customers);
            context.States.RemoveRange(context.States);
            context.Users.RemoveRange(context.Users);
            context.Departments.RemoveRange(context.Departments);

            context.SaveChanges();

//             init seed data
            var departments = new List <Department>()
            {
                new Department()
                {
                    Name = "Spacely Sprockets",
                },
                new Department()
                {
                    Name = "Mystery Machine",
                }
            };

            context.Departments.AddRange(departments);

            var users = new List <User>()
            {
                new User()
                {
                    FirstName = "George", LastName = "Jetson", Phone = "123-4560", Department = departments[0]
                },
                new User()
                {
                    FirstName = "Jane", LastName = "Jetson", Phone = "123-4560", Department = departments[0]
                },
                new User()
                {
                    FirstName = "Velma", LastName = "Dinkley", Phone = "987-6543", Department = departments[1]
                },
                new User()
                {
                    FirstName = "Daphne", LastName = "Blake", Phone = "654-3210", Department = departments[1]
                },
                new User()
                {
                    FirstName = "Norville", LastName = "Rodgers", Phone = "321-9876", Department = departments[1]
                },
            };

            context.Users.AddRange(users);
            context.SaveChanges();
            context.FoodItems.Add(new FoodItem()
            {
                Calories = 1000, Name = "Lasagne", Created = DateTime.Now
            });
            context.FoodItems.Add(new FoodItem()
            {
                Calories = 1100, Name = "Hamburger", Created = DateTime.Now
            });
            context.FoodItems.Add(new FoodItem()
            {
                Calories = 1200, Name = "Spaghetti", Created = DateTime.Now
            });
            context.FoodItems.Add(new FoodItem()
            {
                Calories = 1300, Name = "Pizza", Created = DateTime.Now
            });
            context.SaveChanges();

            var foodItem = context.FoodItems.FirstOrDefault();

            context.Add(new Ingredient()
            {
                FoodItem = foodItem, Quantity = 1, Weight = 2, Description = "meat ball"
            });
            context.Add(new Ingredient()
            {
                FoodItem = foodItem, Quantity = 2, Weight = 3, Description = "suage ball"
            });
            context.SaveChanges();

            // init seed data
            var managers = new List <Manager>()
            {
                new Manager()
                {
                    ManagerId = new Guid("fec0a4d6-5830-4eb8-8024-272bd5d6d2bb"),
                    Name      = "Kevin",
                    CreatedBy = "system",
                    CreatedOn = DateTime.UtcNow
                },
                new Manager()
                {
                    ManagerId = new Guid("c3b7f625-c07f-4d7d-9be1-ddff8ff93b4d"),
                    Name      = "Sven",
                    CreatedBy = "system",
                    CreatedOn = DateTime.UtcNow
                }
            };

            var bands = new List <Band>()
            {
                new Band()
                {
                    BandId    = new Guid("25320c5e-f58a-4b1f-b63a-8ee07a840bdf"),
                    Name      = "Queens of the Stone Age",
                    CreatedBy = "system",
                    CreatedOn = DateTime.UtcNow
                },
                new Band()
                {
                    BandId    = new Guid("83b126b9-d7bf-4f50-96dc-860884155f8b"),
                    Name      = "Nick Cave and the Bad Seeds",
                    CreatedBy = "system",
                    CreatedOn = DateTime.UtcNow
                }
            };

            var tours = new List <Tour>()
            {
                new Tour()
                {
                    TourId           = new Guid("c7ba6add-09c4-45f8-8dd0-eaca221e5d93"),
                    BandId           = new Guid("25320c5e-f58a-4b1f-b63a-8ee07a840bdf"),
                    ManagerId        = new Guid("fec0a4d6-5830-4eb8-8024-272bd5d6d2bb"),
                    Title            = "Villains World Tour",
                    Description      = "The Villains World Tour is a concert tour in support of the band's seventh studio album, Villains.",
                    StartDate        = new DateTimeOffset(2017, 6, 22, 0, 0, 0, new TimeSpan()),
                    EndDate          = new DateTimeOffset(2018, 3, 18, 0, 0, 0, new TimeSpan()),
                    EstimatedProfits = 2500000,
                    CreatedBy        = "system",
                    CreatedOn        = DateTime.UtcNow,
                    Shows            = new List <Show>()
                    {
                        new Show()
                        {
                            Venue     = "The Rapids Theatre",
                            City      = "Niagara Falls",
                            Country   = "United States",
                            Date      = new DateTimeOffset(2017, 6, 22, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Marina de Montebello",
                            City      = "Montebello",
                            Country   = "Canada",
                            Date      = new DateTimeOffset(2017, 6, 24, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Ventura Theatre",
                            City      = "Venture",
                            Country   = "United States",
                            Date      = new DateTimeOffset(2017, 8, 10, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Golden Gate Park",
                            City      = "San Francisco",
                            Country   = "United States",
                            Date      = new DateTimeOffset(2017, 8, 12, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Capitol Theatre",
                            City      = "Port Chester",
                            Country   = "United States",
                            Date      = new DateTimeOffset(2017, 9, 6, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Festival Pier",
                            City      = "Philadelphia",
                            Country   = "United States",
                            Date      = new DateTimeOffset(2017, 9, 7, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Budweiser Stage",
                            City      = "Toronto",
                            Country   = "Canada",
                            Date      = new DateTimeOffset(2017, 9, 9, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        }
                    }
                },
                new Tour()
                {
                    TourId           = new Guid("f67ba678-b6e0-4307-afd9-e804c23b3cd3"),
                    BandId           = new Guid("83b126b9-d7bf-4f50-96dc-860884155f8b"),
                    ManagerId        = new Guid("c3b7f625-c07f-4d7d-9be1-ddff8ff93b4d"),
                    Title            = "Skeleton Tree European Tour",
                    Description      = "Nick Cave and The Bad Seeds have announced an 8-week European tour kicking off in the UK at Bournemouth’s International Centre on 24th September. The tour will be the first time European audiences can experience live songs from new album Skeleton Tree alongside other Nick Cave & The Bad Seeds classics.  The touring line up features Nick Cave, Warren Ellis, Martyn Casey, Thomas Wydler, Jim Sclavunos, Conway Savage, George Vjestica and Larry Mullins.",
                    StartDate        = new DateTimeOffset(2017, 9, 24, 0, 0, 0, new TimeSpan()),
                    EndDate          = new DateTimeOffset(2017, 11, 20, 0, 0, 0, new TimeSpan()),
                    EstimatedProfits = 1200000,
                    CreatedBy        = "system",
                    CreatedOn        = DateTime.UtcNow,
                    Shows            = new List <Show>()
                    {
                        new Show()
                        {
                            Venue     = "Bournemouth International Centre",
                            City      = "Bournemouth",
                            Country   = "United Kingdom",
                            Date      = new DateTimeOffset(2017, 9, 24, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Arena",
                            City      = "Manchester",
                            Country   = "United Kingdom",
                            Date      = new DateTimeOffset(2017, 9, 25, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "The SSE Hydro",
                            City      = "Glasgow",
                            Country   = "United Kingdom",
                            Date      = new DateTimeOffset(2017, 9, 27, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Motorpoint Arena",
                            City      = "Nottingham",
                            Country   = "United Kingdom",
                            Date      = new DateTimeOffset(2017, 9, 28, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "The O2",
                            City      = "London",
                            Country   = "United Kingdom",
                            Date      = new DateTimeOffset(2017, 9, 30, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Zénith",
                            City      = "Paris",
                            Country   = "France",
                            Date      = new DateTimeOffset(2017, 10, 3, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Ziggo Dome",
                            City      = "Amsterdam",
                            Country   = "The Netherlands",
                            Date      = new DateTimeOffset(2017, 10, 6, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Jahrhunderthalle",
                            City      = "Frankfurt",
                            Country   = "Germany",
                            Date      = new DateTimeOffset(2017, 10, 7, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Sporthalle",
                            City      = "Hamburg",
                            Country   = "Germany",
                            Date      = new DateTimeOffset(2017, 10, 9, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Rockhal",
                            City      = "Luxembourg",
                            Country   = "Luxembourg",
                            Date      = new DateTimeOffset(2017, 10, 10, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Mitsubishi Electric Halle",
                            City      = "Düsseldorf",
                            Country   = "Germany",
                            Date      = new DateTimeOffset(2017, 10, 10, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Sportpaleis",
                            City      = "Antwerp",
                            Country   = "Belgium",
                            Date      = new DateTimeOffset(2017, 10, 13, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        }
                    }
                }
            };

            context.Managers.AddRange(managers);
            context.Bands.AddRange(bands);
            context.Tours.AddRange(tours);


            context.SaveChanges();

            var states = GetStates();

            context.States.AddRange(states);
            try
            {
                int numAffected = context.SaveChanges();
            }
            catch (Exception exp)
            {
                throw;
            }

            var customers = GetCustomers(states);

            context.Customers.AddRange(customers);

            try
            {
                int numAffected = context.SaveChanges();
            }
            catch (Exception exp)
            {
                throw;
            }
        }
Example #4
0
        public static void EnsureSeedDatabase(this TourManagementContext context)
        {
            context.Bands.RemoveRange(context.Bands);
            context.Managers.RemoveRange(context.Managers);
            context.Shows.RemoveRange(context.Shows);
            context.Tours.RemoveRange(context.Tours);

            context.SaveChanges();

            var managers = new List <Manager>()
            {
                new Manager()
                {
                    ManagerId = new Guid("fec0a4d6-5830-4eb8-8024-272bd5d6d2bb"),
                    Name      = "Kevin",
                    CreatedBy = "system",
                    CreatedOn = DateTime.UtcNow
                },
                new Manager()
                {
                    ManagerId = new Guid("c3b7f625-c07f-4d7d-9be1-ddff8ff93b4d"),
                    Name      = "Sven",
                    CreatedBy = "system",
                    CreatedOn = DateTime.UtcNow
                },
                new Manager()
                {
                    ManagerId = new Guid("57525bb1-395d-4958-8711-25e78cf634a0"),
                    Name      = "Alice",
                    CreatedBy = "system",
                    CreatedOn = DateTime.UtcNow
                }
            };

            var bands = new List <Band>()
            {
                new Band()
                {
                    BandId    = new Guid("25320c5e-f58a-4b1f-b63a-8ee07a840bdf"),
                    Name      = "Queens of the Stone Age",
                    CreatedBy = "system",
                    CreatedOn = DateTime.UtcNow
                },
                new Band()
                {
                    BandId    = new Guid("83b126b9-d7bf-4f50-96dc-860884155f8b"),
                    Name      = "Nick Cave and the Bad Seeds",
                    CreatedBy = "system",
                    CreatedOn = DateTime.UtcNow
                }
            };

            var tours = new List <Tour>()
            {
                new Tour()
                {
                    TourId           = new Guid("c7ba6add-09c4-45f8-8dd0-eaca221e5d93"),
                    BandId           = new Guid("25320c5e-f58a-4b1f-b63a-8ee07a840bdf"),
                    ManagerId        = new Guid("fec0a4d6-5830-4eb8-8024-272bd5d6d2bb"),
                    Title            = "Villains World Tour",
                    Description      = "The Villains World Tour is a concert tour in support of the band's seventh studio album, Villains.",
                    StartDate        = new DateTimeOffset(2017, 6, 22, 0, 0, 0, new TimeSpan()),
                    EndDate          = new DateTimeOffset(2018, 3, 18, 0, 0, 0, new TimeSpan()),
                    EstimatedProfits = 2500000,
                    CreatedBy        = "system",
                    CreatedOn        = DateTime.UtcNow,
                    Shows            = new List <Show>()
                    {
                        new Show()
                        {
                            Venue     = "The Rapids Theatre",
                            City      = "Niagara Falls",
                            Country   = "United States",
                            Date      = new DateTimeOffset(2017, 6, 22, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Marina de Montebello",
                            City      = "Montebello",
                            Country   = "Canada",
                            Date      = new DateTimeOffset(2017, 6, 24, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Ventura Theatre",
                            City      = "Venture",
                            Country   = "United States",
                            Date      = new DateTimeOffset(2017, 8, 10, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Golden Gate Park",
                            City      = "San Francisco",
                            Country   = "United States",
                            Date      = new DateTimeOffset(2017, 8, 12, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Capitol Theatre",
                            City      = "Port Chester",
                            Country   = "United States",
                            Date      = new DateTimeOffset(2017, 9, 6, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Festival Pier",
                            City      = "Philadelphia",
                            Country   = "United States",
                            Date      = new DateTimeOffset(2017, 9, 7, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Budweiser Stage",
                            City      = "Toronto",
                            Country   = "Canada",
                            Date      = new DateTimeOffset(2017, 9, 9, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        }
                    }
                },
                new Tour()
                {
                    TourId           = new Guid("f67ba678-b6e0-4307-afd9-e804c23b3cd3"),
                    BandId           = new Guid("83b126b9-d7bf-4f50-96dc-860884155f8b"),
                    ManagerId        = new Guid("c3b7f625-c07f-4d7d-9be1-ddff8ff93b4d"),
                    Title            = "Skeleton Tree European Tour",
                    Description      = "Nick Cave and The Bad Seeds have announced an 8-week European tour kicking off in the UK at Bournemouth’s International Centre on 24th September. The tour will be the first time European audiences can experience live songs from new album Skeleton Tree alongside other Nick Cave & The Bad Seeds classics.  The touring line up features Nick Cave, Warren Ellis, Martyn Casey, Thomas Wydler, Jim Sclavunos, Conway Savage, George Vjestica and Larry Mullins.",
                    StartDate        = new DateTimeOffset(2017, 9, 24, 0, 0, 0, new TimeSpan()),
                    EndDate          = new DateTimeOffset(2017, 11, 20, 0, 0, 0, new TimeSpan()),
                    EstimatedProfits = 1200000,
                    CreatedBy        = "system",
                    CreatedOn        = DateTime.UtcNow,
                    Shows            = new List <Show>()
                    {
                        new Show()
                        {
                            Venue     = "Bournemouth International Centre",
                            City      = "Bournemouth",
                            Country   = "United Kingdom",
                            Date      = new DateTimeOffset(2017, 9, 24, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Arena",
                            City      = "Manchester",
                            Country   = "United Kingdom",
                            Date      = new DateTimeOffset(2017, 9, 25, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "The SSE Hydro",
                            City      = "Glasgow",
                            Country   = "United Kingdom",
                            Date      = new DateTimeOffset(2017, 9, 27, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Motorpoint Arena",
                            City      = "Nottingham",
                            Country   = "United Kingdom",
                            Date      = new DateTimeOffset(2017, 9, 28, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "The O2",
                            City      = "London",
                            Country   = "United Kingdom",
                            Date      = new DateTimeOffset(2017, 9, 30, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Zénith",
                            City      = "Paris",
                            Country   = "France",
                            Date      = new DateTimeOffset(2017, 10, 3, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Ziggo Dome",
                            City      = "Amsterdam",
                            Country   = "The Netherlands",
                            Date      = new DateTimeOffset(2017, 10, 6, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Jahrhunderthalle",
                            City      = "Frankfurt",
                            Country   = "Germany",
                            Date      = new DateTimeOffset(2017, 10, 7, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Sporthalle",
                            City      = "Hamburg",
                            Country   = "Germany",
                            Date      = new DateTimeOffset(2017, 10, 9, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Rockhal",
                            City      = "Luxembourg",
                            Country   = "Luxembourg",
                            Date      = new DateTimeOffset(2017, 10, 10, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Mitsubishi Electric Halle",
                            City      = "Düsseldorf",
                            Country   = "Germany",
                            Date      = new DateTimeOffset(2017, 10, 10, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Sportpaleis",
                            City      = "Antwerp",
                            Country   = "Belgium",
                            Date      = new DateTimeOffset(2017, 10, 13, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        }
                    }
                },
                new Tour()
                {
                    //TourId = new Guid("f67ba678-b6e0-4307-afd9-e804c23b3cs3"),
                    BandId           = new Guid("83b126b9-d7bf-4f50-96dc-860884155f8b"),
                    ManagerId        = new Guid("57525bb1-395d-4958-8711-25e78cf634a0"),
                    Title            = "Nick's European Tour",
                    Description      = "Nick Cave and The Bad Seeds have announced an 4-months European tour kicking off in the Croatia at Zagreb’s Arena on 24th September.",
                    StartDate        = new DateTimeOffset(2018, 9, 24, 0, 0, 0, new TimeSpan()),
                    EndDate          = new DateTimeOffset(2019, 1, 20, 0, 0, 0, new TimeSpan()),
                    EstimatedProfits = 1150000,
                    CreatedBy        = "system",
                    CreatedOn        = DateTime.UtcNow,
                    Shows            = new List <Show>()
                    {
                        new Show()
                        {
                            Venue     = "Arena Zagreb",
                            City      = "Zagreb",
                            Country   = "Croatia",
                            Date      = new DateTimeOffset(2018, 9, 24, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        },
                        new Show()
                        {
                            Venue     = "Arena Belgrade",
                            City      = "Belgrade",
                            Country   = "Serbia",
                            Date      = new DateTimeOffset(2018, 10, 25, 0, 0, 0, new TimeSpan()),
                            CreatedBy = "system",
                            CreatedOn = DateTime.UtcNow
                        }
                    }
                }
            };

            context.Bands.AddRange(bands);
            context.Managers.AddRange(managers);
            context.Tours.AddRange(tours);

            context.SaveChanges();
        }