Example #1
0
        public IEnumerable <Order> GetOrdersDeliveredByClient(string email)
        {
            var orders = orderRepository.GetByClient(email)
                         .Where(c => c.State == OrderState.Delivered);

            return(orders.Any() ? orders : throw new NotAvailableOrdersException());
        }
Example #2
0
 public IEnumerable <Order> GetOrdersToDeliverByClient(string emailClient)
 {
     return(orderRepository.GetByClient(emailClient)
            .Where(c => c.State == OrderState.Completed));
 }