Esempio n. 1
0
        public IEnumerable <EtfDisplay> Get(DateTime data, bool shorts, bool distributions)
        {
            int index   = 0;
            var ranking = _rankingService.GetAll(data, shorts, distributions);

            return(ranking.Etfs
                   .OrderByDescending(e => e.MediaTotRet)
                   .Select(e => new EtfDisplay(++index, e)));
        }
Esempio n. 2
0
        private IEnumerable <EtfDisplay> GetAll(DateTime data, bool shorts, bool distributions, bool onlyEtcs = false)
        {
            int index   = 0;
            var ranking = onlyEtcs ? _rankingService.GetAllEtcs(data, shorts, distributions) :
                          _rankingService.GetAll(data, shorts, distributions);

            return(ranking.Etfs
                   .OrderByDescending(e => e.MediaTotRet)
                   .Select(e => new EtfDisplay(++index, e)));
        }
Esempio n. 3
0
        public IActionResult AllRanking(DateTime?dataRiferimento = null)
        {
            var ranking = _rankingService.GetAll(dataRiferimento);
            var model   = RankingViewModel.FromEtfs(ranking);

            model.Title  = "Ranking (All ETFs)";
            model.Action = nameof(AllRanking);

            return(View("Ranking", model));
        }