コード例 #1
0
        public async Task ExecuteAsync(DeletePilotCommand command)
        {
            var pilot = await _pilotRepository.GetById(command.PilotId);

            if (pilot == null)
            {
                throw new Exception("Pilot with this Id does not exist");
            }

            await _pilotRepository.Delete(pilot.Id);
        }
コード例 #2
0
		public void DeletePilotById(int id)
		{
			pilotRepo.Delete(id);
		}