private static async Task UpdateTheItemsFromDatabase(GenerationEnvironment[] environments, IEnumerable <ItemFromFile> uniqueItems)
        {
            var mapper                 = GetMapper();
            var items                  = uniqueItems.Select(item => mapper.Map <Item>(item)).ToList();
            var itemProperties         = items.SelectMany(item => item.Properties).ToList();
            var configurationFilePaths = environments.Select(environment => $"appsettings.{environment.ToString()}.json");

            foreach (var configurationFilePath in configurationFilePaths)
            {
                var configuration    = ConfigurationHelpers.GetMyConfiguration(configurationFilePath);
                var connectionString = DatabaseHelpers.GetMyConnectionString(configuration, nameof(DiabloII.Items.Generator));

                using (var dbContext = DatabaseHelpers.GetMyDbContext(connectionString))
                {
                    dbContext.Database.SetCommandTimeout(CommandTimeout);
                    dbContext.Database.Migrate();

                    var itemRepository = new ItemRepository(dbContext);
                    var command        = new ResetItemsCommand
                    {
                        Items          = items,
                        ItemProperties = itemProperties
                    };

                    await new ItemCommandHandler(itemRepository, dbContext).Handle(command);
                }
            }
        }
 public void OneTimeSetup() => _configuration = ConfigurationHelpers.GetMyConfiguration("appsettings.Production.json");