private static IEnumerable <M_StockWithPrice> AddPriceToStock(StockCollection stockCollection) { StockPriceLoader stockPriceLoader = new StockPriceLoader(); return(stockCollection.EnumerateStocks() .Select(stock => new M_StockWithPrice() { Stock = stock, Price = stockPriceLoader.Load(stock.Ticker) })); }
private void SaveStocks() { _stocksRepository.SaveStocks(_stockCollection.EnumerateStocks()); }