public async Task <IActionResult> UpdateSeason(string id)
        {
            var seasonDetailsModel = await tvShowService.GetSeasonAndDetailsByIdAsync(id);

            var seasonInputModel = mapper.Map <SeasonDetailsViewModel, UpdateSeasonInputModel>(seasonDetailsModel);

            return(View(seasonInputModel));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> SeasonDetails(string id)
        {
            string userId = null;

            if (User.Identity.IsAuthenticated)
            {
                userId = await userService.GetUserIdFromUserNameAsync(User.Identity.Name);
            }

            var seasonDetailsViewModel = await tvShowService.GetSeasonAndDetailsByIdAsync(id, userId);

            return(View(seasonDetailsViewModel));
        }