Esempio n. 1
0
        public async Task <IActionResult> Index(int id)
        {
            IActionResult result;

            try
            {
                var orderedFilmList = await filmService.AttemptRankOrder(id);

                var filmList = filmRankMapper.Map(orderedFilmList);
                if (filmList.Completed)
                {
                    result = View("CompletedFilmRank", filmList);
                }
                else
                {
                    result = View("FilmRank", filmList);
                }
            }
            catch (ListNotFoundException)
            {
                result = NotFound();
            }
            return(result);
        }