Example #1
0
        private DeliveryOption GetCheapestDeliveryOption()
        {
            var id  = _deliveryOptionRepository.FindBy(2);
            var all = _deliveryOptionRepository.FindAll().ToList();

            return(_deliveryOptionRepository.FindAll()
                   .OrderBy(d => d.Cost).FirstOrDefault());
        }
Example #2
0
        public GetAllDispatchOptionsResponse GetAllDispatchOptions()
        {
            var response = new GetAllDispatchOptionsResponse();

            response.DeliveryOptions = _deliveryOptionRepository
                                       .FindAll()
                                       .OrderBy(o => o.Cost)
                                       .ToDeliveryOptionViews();

            return(response);
        }
 private DeliveryOption GetCheapestDeliveryOption()
 {
     return(_deliveryOptionRepository.FindAll().OrderBy(d => d.Cost).FirstOrDefault());
 }