Пример #1
0
        public IActionResult Get(int orderId)
        {
            var order = repo.GetOrderById(User.Identity.Name, orderId);

            if (order != null)
            {
                return(Ok(mapper.Map <IEnumerable <OrderItem>, IEnumerable <OrderItemViewModel> >(order.Items)));
            }
            return(NotFound());
        }