public async Task <IEnumerable <Order> > GetOrdersAsync(DateTime dateFrom, DateTime dateTo) { var getSalesRequest = new GetSalesRequest(dateFrom, dateTo); var rawOrders = new List <Order>(); await ActionPolicies.SubmitAsync.Do(async() => { rawOrders = (await _webRequestServices.GetResponseAsync <OrderList>(getSalesRequest)).Sale.Where(s => s.SaleLines != null).ToList(); }); var items = GetItems(rawOrders); var shipInfos = GetShipInfo(rawOrders); rawOrders.ForEach(o => { o.SaleLines.ForEach(s => o.Products.Add(items.ToList().Find(i => i.ItemId == s.ItemId)) ); if (shipInfos.ContainsKey(o.SaleId)) { o.ShipTo = shipInfos.GetValue(o.SaleId); } }); return(rawOrders); }