Пример #1
0
        public void CheckAndDeleteOldCars()
        {
            var cars = GetFilteredCars(new Filter());

            foreach (var car in cars.List)
            {
                if (car.Sold)
                {
                    if (car.SoldDate.AddDays(3) < DateTime.Now)
                    {
                        _carRepository.CheckAndDeleteOldCars(car);
                    }
                }
            }
        }