public IActionResult FindBooksByGenre(int genreId) { if (ModelState.IsValid) { var books = bookService.FindBooksByGenre(genreId); ViewData["Genres"] = bookService.GetAllGenre(); return(View("Books", books)); } return(View()); }
public IActionResult FindBooksByGenre(int genreId) { if (ModelState.IsValid) { var books = bookService.FindBooksByGenre(genreId); ViewData["Genres"] = bookService.GetAllGenre(); return(View("Books", books)); } return(View()); }