Beispiel #1
0
        public async Task <IActionResult> Get(string trackingNumber)
        {
            var shipmentInformation = await _shipmentRepository.GetAsync(trackingNumber);

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

            return(Ok(shipmentInformation));
        }
        public async Task <IActionResult> Get(string trackingNumber)
        {
            var shipmentInformation = await _shipmentRepository.GetAsync(trackingNumber);

            if (shipmentInformation == null)
            {
                _logger.LogInformation("No information found for shipment {TrackingNumber} ", trackingNumber);

                return(NotFound());
            }

            _logger.LogInformation("Information found for shipment {TrackingNumber} ", trackingNumber);

            return(Ok(shipmentInformation));
        }