Exemple #1
0
        public OrderFoundViewModel RetrieveLastOrderForCustomer(string customerId)
        {
            var order = _orderRepository.FindLastByCustomer(customerId);

            if (order is MissingOrder)
            {
                return(new OrderFoundViewModel());
            }
            return(OrderFoundViewModel.CreateFromOrder(order));
        }
Exemple #2
0
        public OrderFoundViewModel RetrieveOrderForCustomer(int orderId)
        {
            var order = _orderRepository.FindById(orderId);

            if (order is MissingOrder)
            {
                return(new OrderFoundViewModel());
            }
            return(OrderFoundViewModel.CreateFromOrder(order));
        }