Ejemplo n.º 1
0
        private void RecreateDatabase()
        {
            _isInMaintenanceMode = true;

            try
            {
                var dbContext = new SalesHubDbContext();
                dbContext.TruncateData();
                var initializer = new SalesHubDbInitializer();
                initializer.Reseed(dbContext);
            }
            catch (Exception ex)
            {
            }

            ScheduleDatabaseRecreate();
            _isInMaintenanceMode = false;
        }
 public SearchController(SalesHubDbContext salesHubDbContext)
 {
     _salesHubDbContext = salesHubDbContext;
 }