Beispiel #1
0
        public ActionResult <GetOrderId> GetOrderById(int orderId)
        {
            try
            {
                var result = _repository.GetOrderById(orderId);

                IMapper mapper = EDeliveryProfile.GetOrderId();
                return(mapper.Map <GetOrderId>(result));
            }
            catch (Exception ex)
            {
                _logger.LogError($"Failed to get order with the given Id: {ex}");
                return(BadRequest("Failed to get the order with the given Id"));
            }
        }