예제 #1
0
        public IActionResult GetSingleOrderByIdDetailed(int orderId)
        {
            var validOrder = _ordersRepository.CheckForValidOrderId(orderId);

            if (validOrder)
            {
                var order = _ordersRepository.GetSingleOrderDetails(orderId);
                if (order == null)
                {
                    NotFound("Couldn't find an order with that id");
                }
                return(Ok(order));
            }
            return(NotFound("Couldn't find an order with that id"));
        }