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)); }
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")); } }