コード例 #1
0
        private void CleanDatabaseForNewRun()
        {
            Log.Info("CleanDatabaseForNewRun");

            try
            {
                using (var numberRepository = new RandomNumberRepository())
                {
                    numberRepository.CleanDatabase();
                    numberRepository.Save();
                }
            }
            catch (Exception ex)
            {
                Log.Error("Failure to delete all random number values in database", ex);
                throw;
            }
        }
コード例 #2
0
 public void Setup()
 {
     RandomNumberRepository = new RandomNumberRepository();
     RandomNumberRepository.CleanDatabase();
     RandomNumberRepository.Save();
 }