public static async Task SeedAsync(CatalogContext catalogContext,
                                           SearchService searchSvc,
                                           ICloudStorageService storageSvc,
                                           ILoggerFactory loggerFactory, int?retry = 0)
        {
            int retryForAvailability = retry.Value;

            try
            {
                if (!catalogContext.CatalogBrands.Any())
                {
                    catalogContext.CatalogBrands.AddRange(
                        GetPreconfiguredCatalogBrands());

                    await catalogContext.SaveChangesAsync();
                }

                if (!catalogContext.CatalogTypes.Any())
                {
                    catalogContext.CatalogTypes.AddRange(
                        GetPreconfiguredCatalogTypes());

                    await catalogContext.SaveChangesAsync();
                }

                if (!catalogContext.CatalogItems.Any())
                {
                    var items = GetPreconfiguredItems();

                    await storageSvc.UploadFiles(items);

                    catalogContext.CatalogItems.AddRange(items);

                    await catalogContext.SaveChangesAsync();

                    searchSvc.IndexCatalog(items);
                }
            }
            catch (Exception ex)
            {
                if (retryForAvailability < 10)
                {
                    retryForAvailability++;
                    var log = loggerFactory.CreateLogger <CatalogContextSeed>();
                    log.LogError(ex.Message);
                    await SeedAsync(catalogContext, searchSvc, storageSvc, loggerFactory, retryForAvailability);
                }
            }
        }