sped up service for new/empty portfolio

This commit is contained in:
mgroves 2011-02-26 11:34:53 -05:00
parent 4b3f252a38
commit bd57f2f665
2 changed files with 3 additions and 3 deletions

View file

@ -28,8 +28,10 @@ namespace MonoStockPortfolio.Core.Services
{
try
{
var results = new List<PositionResultsViewModel>();
var positions = _portRepo.GetAllPositions(portfolioID);
if (!positions.Any()) return new List<PositionResultsViewModel>();
var results = new List<PositionResultsViewModel>();
var tickers = positions.Select(p => p.Ticker);
var stockData = _stockRepo.GetStockQuotes(tickers);

View file

@ -4,10 +4,8 @@ using System.Linq;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Util;
using Android.Views;
using Android.Widget;
using Java.Lang;
using MonoStockPortfolio.Core;
using MonoStockPortfolio.Core.Config;
using MonoStockPortfolio.Core.PortfolioRepositories;