public void RunRealtimeValuation(int valuationId) { ValuationStatus = "Running"; Valuation valuation = _valuationRepo.GetValuation(valuationId); //retrieve portfolios List <Portfolio> portfolios = new List <Portfolio>(); portfolios = _portfolioRepo.GetPortoflios(); if (portfolios.Count == 0) { return; } //get realtime prices List <PriceValue> prices = _priceEngine.GetPrices(GetAllSymbolsFromPositions(portfolios)); if (prices.Count <= 0) { return; } //save prices SavePriceValues(prices); //valuation positions ValuePositions(portfolios, prices, valuation.Id); }
public void UpdateValuationTest() { ValuationRepo _repo = new ValuationRepo(); Valuation valuation = _repo.GetValuation(1000); }