Exemplo n.º 1
0
        public async Task <IActionResult> ViewChapter(int fanficId, int number)
        {
            ViewChapterViewModel model;

            if (User.Identity.IsAuthenticated)
            {
                var user = await userManager.GetUserAsync(User);

                model = fanficService.GetChapterViewModel(fanficId, number, user);
            }
            else
            {
                model = fanficService.GetChapterViewModel(fanficId, number, null);
            }
            return(View(model));
        }