public async Task StartAsync(CancellationToken cancellationToken)
 {
     if (_hostingEnvironment.IsStaging() || _hostingEnvironment.IsProduction())
     {
         var dbInitializer = new NoSqlContextInitializerMigrate();
         await dbInitializer.InitializeAsync(_context);
     }
     else if (_hostingEnvironment.IsIntegration())
     {
         var dbInitializer = new NoSqlContextInitializerDropCreate();
         await dbInitializer.InitializeAsync(_context);
     }
     else
     {
         var dbInitializer = new NoSqlContextInitializerDropCreate();
         await dbInitializer.InitializeAsync(_context);
     }
 }
        protected override async Task ExecuteAsync(IServiceProvider scopedServiceProvider, CancellationToken stoppingToken)
        {
            var context = scopedServiceProvider.GetRequiredService <NoSqlContext>();

            if (_hostingEnvironment.IsStaging() || _hostingEnvironment.IsProduction())
            {
                var dbInitializer = new NoSqlContextInitializerMigrate();
                await dbInitializer.InitializeAsync(context);
            }
            else if (_hostingEnvironment.IsIntegration())
            {
                var dbInitializer = new NoSqlContextInitializerDropCreate();
                await dbInitializer.InitializeAsync(context);
            }
            else
            {
                var dbInitializer = new NoSqlContextInitializerDropCreate();
                await dbInitializer.InitializeAsync(context);
            }
        }