public AirportViewModel GetAirportByIdRequest(int id) { if (id <= 0) { throw new Exception("Invalid id"); } var airportModel = _airportService.GetAirportById(id); var result = _mapper.Map <AirportViewModel>(airportModel); return(result); }