コード例 #1
0
        public void DeleteAirport(int id)
        {
            Airport airport = _airportRepository.GetById(id);
            List <AirportScheme> schemes =
                _airportSchemeRepository.GetMany(a => a.Airport.Id == airport.Id).ToList();

            foreach (AirportScheme scheme in schemes)
            {
                _airportSchemeRepository.Delete(scheme);
            }
            _airportRepository.Delete(_airportRepository.GetById(id));
            SaveAirport();
        }
コード例 #2
0
 public void DeleteAirportScheme(int id)
 {
     _airportSchemeRepository.Delete(_airportSchemeRepository.GetById(id));
     SaveAirportScheme();
 }