private DeliveryOption GetCheapestDeliveryOption() { var id = _deliveryOptionRepository.FindBy(2); var all = _deliveryOptionRepository.FindAll().ToList(); return(_deliveryOptionRepository.FindAll() .OrderBy(d => d.Cost).FirstOrDefault()); }
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()); }