示例#1
0
        public IActionResult ComicDetails(int comicId)
        {
            List <string> characters = comicDAL.GetAllCharactersInAComic(comicId);
            Comic         comic      = comicDAL.GetComicData(comicId);

            comic.Characters = characters;
            comic.ImageUrl   = SearchAPI(comic.Title);
            return(View(comic));
        }
示例#2
0
        public IActionResult AccountComicDetails(int comicId)
        {
            var user = authProvider.GetCurrentUser();

            int?check = HttpContext.Session.GetInt32("userid");

            if (user != null && check.Value == user.Id)
            {
                List <string> characters = comicDAL.GetAllCharactersInAComic(comicId);
                Comic         comic      = comicDAL.GetComicData(comicId);
                comic.Characters = characters;
                comic.ImageUrl   = SearchAPI(comic.Title);
                return(View(comic));
            }
            else
            {
                return(RedirectToAction("Login"));
            }
        }