コード例 #1
0
        public IActionResult GetById([FromRoute] int id)
        {
            var station = _stationsCacheStoreClient.GetRecordById(id);

            if (station is null)
            {
                return(NotFound());
            }

            var stationDto = _mapper.Map <StationDto>(station);

            return(Ok(stationDto));
        }
コード例 #2
0
        public IActionResult GetById(int id)
        {
            var externalAirIndex = _airIndexesCacheStoreClient.GetRecordById(id);

            if (externalAirIndex is null)
            {
                return(NotFound());
            }

            var airIndex = _mapper.Map <AirIndexDto>(externalAirIndex);

            return(Ok(airIndex));
        }