Ejemplo n.º 1
0
        private List <string> GetMonthlyTopProducts(string database, int numberOfRecommendations)
        {
            List <string> top20Products = _db.GetMonthlyTopProducts(database).Result;
            List <string> result        = new List <string>();

            if (numberOfRecommendations > 20)
            {
                numberOfRecommendations = 20;
            }

            for (int i = 0; i < numberOfRecommendations; i++)
            {
                result.Add(top20Products[i]);
            }

            return(result);
        }