public IActionResult Index() { int countBook = 0; foreach (var item in repo1.GetBooks()) { countBook++; } ViewBag.countBook = countBook; int countAuthor = 0; foreach (var item in repo2.GetBooks()) { countAuthor++; } ViewBag.countAuthor = countAuthor; int countGanre = 0; foreach (var item in repo3.GetBooks()) { countGanre++; } ViewBag.countGanre = countGanre; return(View()); }
public IActionResult ListOfGanres() { return(View(repo.GetBooks())); }