public async Task <IActionResult> Book(int id) { Book value = await bookRepo.tGetByID(id); if (value != null) { IEnumerable <Cat> cat = await catRepo.GetByBook(id); IEnumerable <SubCat> subCat = await subCatRepo.GetByBook(id); IEnumerable <Book> relPro = await bookRepo.tGetRelated(id); ViewBag.Cat = cat; ViewBag.SubCat = subCat; ViewBag.RelatedPro = relPro; } return(View(value)); }