示例#1
0
        public async Task <IEnumerable <PopularityModel> > GetPopular(int top = 20)
        {
            var result = new PopularityModel[] { };

            try
            {
                result = await _popularityService.Query(top);
            }
            catch (Exception ex)
            {
                Trace.TraceError(ex.Message);

                //NOTE: discuss with business whether to throw 500 or handle differently
            }

            return(result);
        }