public ActionResult BookDetail(int bookID) { BookDAO book = new BookDAO(); if (book == null) { Redirect("Index"); } return(View(book.BookDetail(bookID))); }
public IHttpActionResult GetBookDetail(int bookId) { BookDAO dao = new BookDAO(); var book = dao.BookDetail(bookId); BookViewModel viewmodel = new BookViewModel(book); return(Json(new { results = viewmodel })); }