コード例 #1
0
        public async Task <PagingResultEnvelope <StockModel> > GetStocksFromWatchList(int watchListId, PagingParam pagingParam)
        {
            var result = await watchListRepository.GetWatchList();

            if (!result.Any())
            {
                // create a default watch list if there aren't any
                await NewWatchList(new NewWatchListModel
                {
                    Name   = "Default",
                    Stocks = new List <string>()
                });
            }
            return(await watchListRepository.GetStocksFromWatchlist(watchListId, pagingParam));
        }