コード例 #1
0
        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);
        }