示例#1
0
        public async Task <ActionResult <Flight> > GetFlightAsync(int id)
        {
            var flight = await _repository.GetByIdAsync(id);

            if (flight == null)
            {
                return(NotFound());
            }

            return(Ok(_mapper.Map <FlightReadDto>(flight)));
        }