示例#1
0
        private void DeleteInitialData()
        {
            IGroomingRepository groomingRepository = new GroomingRepository();
            foreach (var grooming in _groomings)
            {
                Grooming fromDb = groomingRepository.GetById(grooming.GroomingId);
                if (fromDb != null)
                {
                    groomingRepository.Remove(grooming);
                }
            }

            IUserRepository userRepository = new UserRepository();
            userRepository.Remove(_user1);
            userRepository.Remove(_user2);

            IDogRepository dogRepository = new DogRepository();
            dogRepository.Remove(_dog1);
            dogRepository.Remove(_dog2);

            IGroomingTypeRepository groomingTypeRepository = new GroomingTypeRepository();
            groomingTypeRepository.Remove(_groomingType1);
            groomingTypeRepository.Remove(_groomingType2);
        }
示例#2
0
        private void DeleteInitialData()
        {
            ITrainingRepository trainingRepository = new TrainingRepository();
            foreach (var training in _trainings)
            {
                Training fromDb = trainingRepository.GetById(training.TrainingId);
                if (fromDb != null)
                {
                    trainingRepository.Remove(training);
                }
            }

            IUserRepository userRepository = new UserRepository();
            userRepository.Remove(_user1);
            userRepository.Remove(_user2);

            IDogRepository dogRepository = new DogRepository();
            dogRepository.Remove(_dog1);
            dogRepository.Remove(_dog2);

            ICostRepository costRepository = new CostRepository();
            costRepository.Remove(_classCost);
            costRepository.Remove(_preK9DaycareCost);
            costRepository.Remove(_newClassCost);

            ICostTypeRepository costTypeRepository = new CostTypeRepository();
            costTypeRepository.Remove(_classType);
        }
示例#3
0
        private void DeleteInitialData()
        {
            IDaycareRepository daycareRepository = new DaycareRepository();
            foreach (var daycare in _daycares)
            {
                Daycare fromDb = daycareRepository.GetById(daycare.DaycareId);
                if (fromDb != null)
                {
                    daycareRepository.Remove(daycare);
                }
            }

            IUserRepository userRepository = new UserRepository();
            userRepository.Remove(_user1);
            userRepository.Remove(_user2);

            IDogRepository dogRepository = new DogRepository();
            dogRepository.Remove(_dog1);
            dogRepository.Remove(_dog2);

            ICostRepository costRepository = new CostRepository();
            costRepository.Remove(_daycareCost);
        }
        private void DeleteInitialData()
        {
            IPickupDropoffRepository pickupDropoffRepository = new PickupDropoffRepository();
            foreach (var pickupDropoff in _pickupDropoffs)
            {
                PickupDropoff fromDb = pickupDropoffRepository.GetById(pickupDropoff.PickupDropoffId);
                if (fromDb != null)
                {
                    pickupDropoffRepository.Remove(pickupDropoff);
                }
            }

            IUserRepository userRepository = new UserRepository();
            userRepository.Remove(_user1);
            userRepository.Remove(_user2);

            IDogRepository dogRepository = new DogRepository();
            dogRepository.Remove(_dog1);
            dogRepository.Remove(_dog2);

            ICostRepository costRepository = new CostRepository();
            costRepository.Remove(_pickupCost);
            costRepository.Remove(_dropoffCost);
            costRepository.Remove(_newPickupCost);
        }
示例#5
0
        private void DeleteInitialData()
        {
            ITimeCardRepository timeCardRepository = new TimeCardRepository();
            foreach (var timeCard in _timeCards)
            {
                TimeCard fromDb = timeCardRepository.GetById(timeCard.TimeCardId);
                if (fromDb != null)
                {
                    timeCardRepository.Remove(timeCard);
                }
            }

            IUserRepository userRepository = new UserRepository();
            userRepository.Remove(_user);
        }
示例#6
0
        private void DeleteInitialData()
        {
            IBoardingRepository boardingRepository = new BoardingRepository();
            foreach (var boarding in _boardings)
            {
                Boarding fromDb = boardingRepository.GetById(boarding.BoardingId);
                if (fromDb != null)
                {
                    boardingRepository.Remove(boarding);
                }
            }

            IUserRepository userRepository = new UserRepository();
            userRepository.Remove(_user1);
            userRepository.Remove(_user2);

            IDogRepository dogRepository = new DogRepository();
            dogRepository.Remove(_dog1);
            dogRepository.Remove(_dog2);

            ICostRepository costRepository = new CostRepository();
            costRepository.Remove(_boardingCost);
            costRepository.Remove(_sundayDaycareCost);
        }